大网数据广告活动
Web 标准与前端开发

Sec-Fetch-Storage-Access header

· 52CE 我爱测

The HTTP **`Sec-Fetch-Storage-Access`** fetch metadata request header provides the "storage access status" for the current fetch context.

The HTTP Sec-Fetch-Storage-Access fetch metadata request header provides the "storage access status" for the current fetch context.

The status can indicate that permission to access unpartitioned 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 is include. The header should not be sent with same-site requests (since those requests cannot involve cross-site cookies), or if the request's credentials mode is "omit". The requested resource must also have a potentially trustworthy origin.

If a storage access permission has been granted but not activated, a server can respond with Activate-Storage-Access to request activation of the permission for the context. For more information see Storage access headers in the Storage Access API overview.

<table class="properties"> <tbody> <tr> <th scope="row">Header type</th> <td>Fetch Metadata Request Header</td> </tr> <tr> <th scope="row">Forbidden request header</th> <td>Yes (<code>Sec-</code> prefix)</td> </tr> <tr> <th scope="row"> CORS-safelisted request header </th> <td>No</td> </tr> </tbody> </table>

Syntax

Sec-Fetch-Storage-Access: none
Sec-Fetch-Storage-Access: inactive
Sec-Fetch-Storage-Access: active

Directives

A value indicating the storage access status for the current fetch context. The following values are allowed (servers should ignore other values):

  • none
    • : The context does not have the storage-access permission or access to unpartitioned cookies.
  • inactive
    • : The context has the storage-access permission, but has not opted into using it (and does not have unpartitioned cookie access through other means). If this value is set, then the Origin request header should also be set.
  • active
    • : The context has unpartitioned cookie access. If this value is set, then the Origin request header should also be set.

Examples

See Examples in Activate-Storage-Access.

Specifications

Browser compatibility

See also

来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
MDN Web Docs / Mozilla 贡献者
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 2.5

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。