coderef

Related website setsLimited availability

Related website sets declares relationships between sites so the browser allows cookie and storage access between them through methods such as document.requestStorageAccessFor().

Not yet supported in all major browsers — check the table and provide a fallback.

Discouraged: Following the announcement that Chrome will maintain its current approach to third-party cookies, Chrome decided to withdraw certain Privacy Sandbox features including the related website sets.

Browser support

DesktopChrome
1–118Not supported
119+Supportedsince Oct 31, 2023
Current: 155
Edge
12–118Not supported
119+Supportedsince Nov 2, 2023
Current: 154
Firefox
✕Not supportedup to 157
Current: 157
Safari
✕Not supportedup to 27
Current: 27
MobileChrome Android
18–119Not supported
120+Supportedsince Dec 5, 2023
Current: 155
Firefox Android
✕Not supportedup to 157
Current: 157
Safari iOS
✕Not supportedup to 27
Current: 27

How to use

Not supported in Firefox, Safari, Firefox Android, Safari iOS. Use feature detection below and provide a fallback (or a polyfill) for those browsers.

Example

Full syntax and examples are on MDN: requestStorageAccessFor.

Feature detection

JS · check before using
if ("Document" in globalThis && "requestStorageAccessFor" in Document.prototype) {
  // Document.requestStorageAccessFor is available
}

Sub-features

Support for each part of the feature (2). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
Document.requestStorageAccessFor119119✕✕119✕✕
Permissions.permission_top-level-storage-access113113✕✕120✕✕