Sec-Fetch-Storage-Access header
The HTTPSec-Fetch-Storage-Accessfetch metadata request header provides the "storage access status" for the current fetch context.
The status can indicate that permission to accessunpartitioned third-party cookies:
- Is not granted.
- Has been granted but not activated for the current request context.
- Has been granted for the current request content, and the cookies have been sent with the request.
Supporting browsers must include this header on cross-site requests when the request credential mode isinclude.The header should not be sent with same-site requests (since those requests cannot involve cross-site cookies), or if the request'scredentials mode is "omit".The requested resource must also have apotentially trustworthy origin.
If a storage access permission has been granted but not activated, a server can respond withActivate-Storage-Access to request activation of the permission for the context.For more information seeStorage access headers in theStorage Access API overview.
| Header type | Fetch Metadata Request Header |
|---|---|
| Forbidden request header | Yes (Sec- prefix) |
| CORS-safelisted request header | No |
In this article
Syntax
Sec-Fetch-Storage-Access: noneSec-Fetch-Storage-Access: inactiveSec-Fetch-Storage-Access: activeDirectives
A value indicating the storage access status for the current fetch context.The following values are allowed (servers should ignore other values):
noneThe context does not have the
storage-accesspermission or access to unpartitioned cookies.inactiveThe context has the
storage-accesspermission, but has not opted into using it (and does not have unpartitioned cookie access through other means).If this value is set, then theOriginrequest header should also be set.activeThe context has unpartitioned cookie access.If this value is set, then the
Originrequest header should also be set.
Examples
Specifications
| Specification |
|---|
| Storage Access Headers> # sec-fetch-storage-access-header> |
Browser compatibility
See also
Activate-Storage-Access- Storage access headers inStorage Access API
- Storage access header sequences inStorage Access API
- Using the Storage Access API
- Fetch Metadata Request Headers playground (secmetadata.appspot.com)