参与存储分区的早期测试
如何检查您的网站是否受到存储分区的影响。
为了加强隐私保护,Chrome 将更改存储和通信 API 在未来版本中的行为方式。详细了解存储分区即将发生的变化。
自 2022 年 7 月起,初始实现已在 Chrome 105 中通过标志提供。从 Chrome Beta 版 106 开始,新实现(包括 Cache Storage 分区)自 2022 年 9 月起可供测试。最新功能和 bug 修复将首先在 Chrome Canary 中推出,因此请考虑使用 Canary 以便继续进行测试。
这项变更应该不会影响您的应用仅在第一方环境中使用存储空间的最常见用例,但我们建议您进行测试,以确保您的应用继续照常运行。如果您与 iframe 交互或依赖 iframe 中的存储,则更改更有可能对您产生影响。
如何测试存储分区
如需尝试对存储空间进行分区,请执行以下操作:
- 请确保您使用的是 Chrome Beta 版 106 或更高版本。
- 转到
chrome://flags/#third-party-storage-partitioning
。
- 启用“实验性第三方存储分区”标记。
参与早期测试并报告 bug,帮助 Chrome 团队在稳定版发布前发现并修复任何意外行为。
什么是存储分区
为防止某些类型的边信道跨网站跟踪,Chrome 会在第三方上下文中对存储和通信 API 进行分区(如需了解详情,请参阅说明)。
过去,存储系统仅由源键控。这意味着,如果来自 example.com
的 iframe 嵌入到 a.com
和 b.com
中,example.com
可以通过存储 ID 并从存储空间中成功检索 ID,了解您在这两个顶级网站的浏览习惯。启用第三方存储分区后,example.com
的存储空间将存在于两个不同的分区中,一个用于 a.com
,另一个用于 b.com
。存储分区可以防止嵌入内容加入您对任一网站的访问。
启用“实验性第三方存储分区”标志时,系统会对以下存储和通信 API 进行分区:
以下 API 正在积极开发中,会在发布稳定版之前进行分区:
- Blob 网址
- Clear-Site-Data 标头
此功能何时默认推出
我们希望根据稳定性和兼容性在 2023 年初开始发布该功能。立即测试第三方存储分区并提交 bug 有助于 Chrome 从生态系统中获取反馈,以确保开发者和网站所有者获得所需的支持。
报告 bug
提供反馈的最佳方式是提交新问题,方法是通过可公开访问的网址的链接或缩减测试用例数。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2022-09-01。
[null,null,["最后更新时间 (UTC):2022-09-01。"],[[["Chrome is changing how websites store and access data to enhance user privacy by partitioning storage in third-party contexts."],["This change primarily impacts websites that utilize storage within iframes or interact with storage across different top-level sites."],["Developers can test this change in Chrome Beta 106 or higher by enabling the \"Experimental Third-party Storage Partitioning\" flag."],["Storage APIs such as Cache Storage, IndexedDB, and Web Storage will be partitioned, impacting cross-site data sharing."],["The feature is expected to launch in early 2023, and developers are encouraged to test and report any issues to ensure a smooth transition."]]],["Chrome is implementing Storage Partitioning to enhance privacy by isolating storage and communication APIs in third-party contexts. To test, use Chrome Beta 106+ and enable the \"Experimental Third-party Storage Partitioning\" flag. This impacts APIs like Cache Storage, IndexedDB, and Web Storage. Developers should test, especially if their apps rely on storage in iframes. Report any bugs found during testing to aid the Chrome team in identifying and fixing issues. The intended launch is planned for early 2023.\n"]]