📖 Note: Refer to the Related Website Sets documentation to understand how the API works.
👋 Make sure you follow and [PASS] the "Set-up and settings" steps below before trying the demos.
requestStorageAccess()
in a cross-site, same-set iframe
.requestStorageAccessFor()
for embedded cross-site, same-set resources.This demo uses two sites: related-website-sets.glitch.me
and rws-member-1.glitch.me
, which are both part of the same Related Website Set. related-website-sets.glitch.me
sets a cookie named crossSite
to that will be allowed in the cross-site, same-set contexts via the Storage Access API.
chrome://flags
, set the flag test-third-party-cookie-phaseout
to Enabled
. Make sure to restart Chrome for the flags to take effect.--use-related-website-set="{\"primary\": \"https://related-website-sets.glitch.me\", \"associatedSites\": [\"https://rws-member-1.glitch.me\"]}" \ https://related-website-sets.glitch.me/
document.hasStorageAccess()
available.document.requestStorageAccess()
available.document.requestStorageAccessFor()
available.Set-Cookie: crossSite=[timestamp]; Path=/; Secure; SameSite=None
: