v152 · removal · privacy sandbox
Storage Access Migration Guide
A step-by-step migration wizard from document.requestStorageAccessFor() to its recommended replacements. Identify your use case, compare old vs. new code, and run live tests to see what Chrome 152 actually returns.
document.requestStorageAccessFor() is removed. Calls throw a TypeError. Migrate to document.requestStorageAccess() called from inside the embedded iframe, or use CHIPS for partitioned cookie storage.
Which use cases apply to you?
Check every pattern your site currently relies on. Step 2 will show the replacement for each one.
Code replacements
Select a scenario to see the old pattern next to its replacement.
// Top-level page context // Requests access on behalf // of embedded.example await document.requestStorageAccessFor( "https://embedded.example" ); // Grants unpartitioned cookie // access to embedded.example
// Inside the iframe at
// embedded.example, after a
// user gesture:
const granted =
await document.requestStorageAccess({
all: true
});
// Or check first:
const has =
await document.hasStorageAccess();
if (!has) {
await document.requestStorageAccess();
}
Live test
Run the old and new API shapes in this browser and see what each returns. Results reflect your actual Chrome version.
Calls document.requestStorageAccessFor("https://example.com") from a top-level context. Chrome 152 removes this method entirely.
Calls document.hasStorageAccess() — the probe that replaces the old check. Available in Chrome, Firefox, and Safari.
Calls document.requestStorageAccess() from the top-level page context. Note: this normally requires an iframe context — this test shows the rejection message you will see from the top-level context.
Deprecation timeline
How the requestStorageAccessFor API evolved and where Chrome stands today.
document.requestStorageAccessFor() ships as an origin trial alongside Related Website Sets as part of the Privacy Sandbox initiative.requestStorageAccessFor allows top-level pages to trigger access on behalf of embedded origins.requestStorageAccessFor and RWS were built to support is no longer necessary.document.requestStorageAccessFor(). document.requestStorageAccess() continues to work.document.requestStorageAccessFor is removed from the Document prototype. Calls throw TypeError: document.requestStorageAccessFor is not a function. RWS membership no longer grants automatic storage access. Migrate to requestStorageAccess() inside embedded iframes or use CHIPS.document.requestStorageAccess(), document.hasStorageAccess(), and the Partitioned cookie attribute (CHIPS) remain supported. These are the cross-browser standard path for cross-site storage use cases.see also
- requestStorageAccessFor deprecation — feature index
- Migration Lab — side-by-side live comparison
- API Surface Probe — check which methods are present
- ChromeStatus entry
- requestStorageAccess on MDN
- CHIPS / Partitioned cookies on MDN