Skip to Content
Platform.Ontology

Storage Access API

Lets an embedded frame ask to use its third-party cookies; the browser may prompt or auto-allow.

Asks you firstTracking across apps and sitesCross-site cookiesWeb browsersWhile you use it

In one line

Can ask to use its own cookies when embedded in another site

Lets an embedded frame ask to use its third-party cookies; the browser may prompt or auto-allow.

Used by embedded SSO, comments and video frames to regain cross-site cookies on Safari, Firefox and Chrome. Safari prompts per embed; Firefox auto-grants after 5 prior interactions and a prompt in other cases; Chrome shows a prompt.

What it can and can't do

What the user does: You click a button in an embed, such as a login or comment box, and see a prompt

It can

  • Ask the browser to let an embedded frame use its own cookies
  • Keep you signed in to that embedded service
  • Get approved without a prompt in some cases, based on past use

It cannot

  • Use the cookies without approval from the browser or you
  • Reach cookies of other sites
  • Work if you click Don't allow
  • Persist forever, since browsers can ask again

How it differs between platforms: Safari and Firefox show a prompt or approve automatically after use. Chrome allows it with less friction.

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported1192023-10-31None
EdgeSupported852020-08-27None
FirefoxSupported652019-01-29None
SafariSupported11.12018-04-12None
Safari on iPhoneSupported11.32018-03-29None
Chrome on AndroidSupported1202023-12-05None
Samsung InternetSupported25.02024-04-24None

How a site asks for it

APIdocument.hasStorageAccess(), document.requestStorageAccess(), Permissions API storage-access
Permission namestorage-access
Permissions policystorage-access
Browser compat keysapi.Document.requestStorageAccess
api.Document.hasStorageAccess
How access is grantedprompt
What the user seesBrowser prompt: allow site to use cookies and data on this site
Needs a secure context (HTTPS)Yes
Needs a user gestureYes
How long it lastsChrome grant lasts 30 days for the embed; Safari 24 hours of use then reprompt (approx.); Firefox 30 days
How to take it backClear site data, browser privacy settings
Inside an iframeGranted per embedded frame; sandbox needs allow-storage-access-by-user-activation

Data you get

What comes back: Grant state
Shape: boolean
How often: per frame

FieldTypeUnitRangePrecision
grantedbooleannonetrue or falseexact

Technical limits

  • Needs a user gesture in the iframe
  • Frame must have interacted as first party in the past (Safari, Firefox)
  • Sandboxed frames need allow-storage-access-by-user-activation

The story

What it is

Lets an embedded frame ask to use its cookies from other sites, and the browser may prompt you.

For you

You see a prompt in some browsers: this site wants to use cookies on another site. If you allow it, an embedded login, comment box or video frame can recognise you. In some browsers, it grants after some use.

For makers

Single sign on, comments and paid video frames need cookies from their own domain. The API gives them a way back in after blocking. It also gives the browser a place to ask the person, as a check on trackers.

Where you see it

TypeExampleApps
socialA comment box from a social site recognises you inside a news article, and lets you post.Disqus, Facebook
videoA paid video embed checks your subscription cookie from its own domain, so it can play for you.Vimeo, YouTube
gamesA game inside a portal frame uses its cookie to remember your login and progress.itch.io, Poki
enterpriseA work tool embedded in another app uses its login cookie in the frame.Salesforce, Atlassian
paymentsA payment frame recognises your saved card details, from its own domain.Stripe, PayPal
securityBrowsers use the prompt to stop trackers hidden in embeds from asking for cookies for free.Safari, Firefox

Risks

  • Prompt can be clicked without thinking
  • Rules differ across browsers

What the platform says

  • Apple: Storage Access API. WebKit introduced it as a way for embedded content to ask for cookie access with the person's consent.

Good uses and abuse

Legitimate uses

  • Embedded login and comment widgets

Known abuse

  • Embedded tracker regaining cookies after prompt fatigue

Scores

ScoreValueMeaning
Sensitivity3 of 5How revealing the data is
Utility4 of 5How useful it is to honest apps
Friction2 of 5How much the user has to do
Fingerprint bitsNot ratedRough identifying entropy, when known

History

  • 2018-03, Safari 11.1: First browser to ship
  • 2019-01, Firefox 65: Shipped
  • 2023-10, Chrome 119: On by default

Sources

How well checked: Checked against real behavior.

On this page