Feature-Policy: web-share
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
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
web-share |
No |
No |
81
Firefox recognizes the
web-share permissions policy, but this has no effect in versions of Firefox that do not support the share() method. |
No |
No |
No |
No |
No |
81
Firefox recognizes the
web-share permissions policy, but this has no effect in versions of Firefox that do not support the share() method. |
No |
No |
No |
Browser implementation is being discussed in https://github.com/w3c/web-share/issues/169.
See also
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy/web-share