The HTTP Permissions-Policy header storage-access directive controls whether a document loaded in a third-party context (i.e., embedded in an iframe) is allowed to use the Storage Access API to request access to unpartitioned cookies.
This is relevant to user agents that by default block access to unpartitioned cookies by sites loaded in a third-party context to improve privacy (for example, to prevent tracking).
Specifically, where a defined policy blocks use of this feature, Document.requestStorageAccess() calls will return a Promise that rejects with a DOMException of type NotAllowedError.
Syntax
Permissions-Policy: storage-access=<allowlist>;
<allowlist>- : A list of origins for which permission is granted to use the feature. See
Permissions-Policy> Syntax for more details.
- : A list of origins for which permission is granted to use the feature. See
Default policy
The default allowlist for storage-access is *.
Specifications
Browser compatibility
See also
- Storage Access API
- Permissions-Policy header
- Permissions Policy
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
