Storage Access API
Lets an embedded third-party frame ask for its own cookies back.
In one line
Can ask to get its own cookies back when shown inside another site
Lets an embedded third-party frame ask for its own cookies back.
When third-party cookies are blocked, a frame can ask to use its first-party cookies. A grant lets that embed recognise the person across sites where it is embedded.
What it can and can't do
What the user does: You tap Sign in or Allow inside an embedded box, then answer the prompt.
It can
- Ask for its own cookies in an embedded frame, such as a login or comment box
- Get access without a prompt in Chrome if the sites are in the same set
- Keep access for 30 days in Firefox
It cannot
- Get access without a tap inside the frame
- See cookies that belong to other sites
- Get access if you choose Don't allow
How it differs between platforms: Safari always asks. Firefox asks after a number of sites. Chrome asks unless the sites are in the same Related Website Set.
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 119 | 2023-10-31 | None |
| Edge | Supported | 85 | 2020-08-27 | None |
| Firefox | Supported | 65 | 2019-01-29 | None |
| Safari | Supported | 11.1 | 2018-04-12 | None |
| Safari on iPhone | Supported | 11.3 | 2018-03-29 | None |
| Chrome on Android | Supported | 120 | 2023-12-05 | None |
| Samsung Internet | Not supported | Not available | Not listed | None |
How a site asks for it
| API | document.hasStorageAccess(); document.requestStorageAccess(); permission storage-access |
| Permission name | storage-access |
| Permissions policy | storage-access |
| Browser compat keys | api.Document.requestStorageAccessapi.Document.hasStorageAccess |
| How access is granted | prompt |
| What the user sees | Safari: always prompts (Allow or Don't Allow). Firefox: prompts after a number of sites; grants last 30 days. Chrome: prompts unless the sites are in the same Related Website Set (auto-grant). |
| Needs a secure context (HTTPS) | Yes |
| Needs a user gesture | Yes |
| How long it lasts | Per top-level site and embedded site pair; lapses after 30 days without interaction (Chrome and Firefox) |
| How to take it back | Site settings, clearing site data, Permissions API 'change' event |
| Inside an iframe | Frame must be the one asking; sandboxed frames need allow-storage-access-by-user-activation |
Typical flow
- User interacts with the embedded frame
- Frame calls requestStorageAccess()
- Browser may prompt or auto-grant
- Frame can now send first-party cookies (SameSite=None; Secure)
Data you get
What comes back: Whether storage access is granted
Shape: boolean
How often: one-shot
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
Sec-Fetch-Storage-Access | header | enum | none, inactive, active | 3 values |
Activate-Storage-Access | header | enum | retry, load | 2 values |
Technical limits
- Needs user interaction with the frame first
- Denied if the person never visited the embedded site as first party (Firefox: in 30 days)
- Cross-site storage not granted for other frames
The story
What it is
Lets an embedded third party frame ask for its own cookies back.
For you
You may see a prompt like 'Allow this site to use cookies on other sites?' or you may need to tap inside the embedded box. Say yes and the embedded box may log in.
For makers
It lets honest embeds like comments, chat and video logins keep working while browsers block tracking by default. It is also the place where ad and tracking firms ask for access.
Where you see it
| Type | Example | Apps |
|---|---|---|
| social | A comment box from another service asks to use your login so you can post. | None named |
| video | An embedded video player asks for access so it can keep your login and settings. | None named |
| productivity | A document or design tool embedded in another site asks for its cookies to open your file. | Figma |
| enterprise | A work app embedded inside another app asks for access so you stay signed in. | None named |
| payments | A payment frame asks for access to recognise a returning buyer. | None named |
| ads | An ad or tracking company asks for access, and the browser decides whether to allow it. | None named |
| messaging | A support chat widget asks for access to keep your chat across pages. | Intercom |
Risks
- Cross site tracking
- Easy to click through
What the platform says
- MDN: Storage Access API. Documents how an embedded site can ask the browser for access to its own cookies.
- WebKit: Introducing Storage Access API. Apple describes a way for embedded content to ask for cookie access while blocking tracking by default.
Good uses and abuse
Legitimate uses
- Embedded login and payment widgets
Known abuse
- Cross-site tracking after a grant
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 3 of 5 | How revealing the data is |
| Utility | 4 of 5 | How useful it is to honest apps |
| Friction | 2 of 5 | How much the user has to do |
| Fingerprint bits | 2 | Rough identifying entropy, when known |
History
- 2018-03, Safari 11.1: Storage Access API ships
- 2019-01, Firefox 65: Storage Access API ships
- 2023-10, Chrome 119: Storage Access API ships
Related capabilities
Related
- Top-level storage access (requestStorageAccessFor). Can ask Chrome to let related embedded sites use their cookies, if you allow
Sources
How well checked: Checked against real behavior.