Feature-Policy: web-share

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The HTTP Feature-Policy header web-share directive controls whether the current document is allowed to use the Navigator.share() method of the Web Share API to share text, links, images, and other content to arbitrary destinations of the user's choice.

Syntax

Feature-Policy: web-share <allowlist>;
<allowlist>

A list of origins for which the feature is allowed. See Feature-Policy.

Default policy

The default value is 'self'.

Specifications

Specification
Web Share API
# permissions-policy

Browser compatibility

BCD tables only load in the browser

Browser implementation is being discussed in https://github.com/w3c/web-share/issues/169.

See also