Skip to content
WebsiteHosting.com

concept Frontend & browsers

Storage partitioning and third-party contexts

An embedded panel can come from the same origin on two sites yet see different stored state. Compare the key selected in each context and see why a cookie grant need not change access to other storage.

Latest recorded source check · P0182

What it means

Storage partitioning can give the same embedded origin a different place to store data on each top-level site. Suppose two sites display the same embedded preferences panel. The panel can load from the same origin on both sites without having access to the same saved preference.

The top-level site is the site containing the panel. The embedded origin identifies where the panel comes from. A storage key in this example labels the collection of data the panel can access. It is not the name or value of a cookie.

Try it

Simulation. Compare two pages that both embed embed.test. Start with cookies, the partitioned policy, and no unpartitioned cookie grant in either context. On a.test, the selected key is a.test|embed.test. On b.test, it is b.test|embed.test. The result is separate: the embedded origin matches, but the top-level part of the key differs.

Storage partitioning and third-party contexts

Explain why the same embedded origin may not share storage across top-level sites

Simulation
Modeled outcome: Separate

The effective access keys differ under the stipulated policy.

Storage partitioning and third-party contexts: synthetic scenario inputs
Replaces all inputs with the documented starting example and the indicated change. Reset restores the starting example.
Storage keys for two top-level contexts

Context A

  1. Top-level sitea.test
  2. Cookie grantno
  3. Effective storage keya.test|embed.test

Context B

  1. Top-level siteb.test
  2. Cookie grantno
  3. Effective storage keyb.test|embed.test

Policy

  1. Policypartitioned
  2. APIcookies
  3. Outcomeseparate

Keys represent only the stipulated policy and API. Cookie grants do not imply unpartitioning of unrelated storage APIs.

Evaluated inputs

Required scenario evidence
provided
Browser policy evidence
partitioned
Top-level site A
a.test
Top-level site B
b.test
Storage API under comparison
cookies
Observed unpartitioned cookie grant A
no
Observed unpartitioned cookie grant B
no

Abstract selected access key for one embedded origin; cookies versus a stipulated separately partitioned other API. Cookie grants supplied as observed outcomes, not how to obtain/bypass them; no tracking, real storage, cookie flags, opaque origins, browser version-specific guarantee, simultaneous access to multiple jars or exact site algorithm. Different policy examples, not claims all browsers implement them.

About this model

The controls set only a local, bounded scenario. The computed branch is not a verdict about a live system. Inputs listed as not evaluated did not participate in this branch after validation.

Reset restores the original inputs. It does not change the open or closed state of help or FAQ answers.

Change only Top-level site B to a.test. B's key becomes a.test|embed.test, matching A's key. The result is now shared. Partitioning is still in effect; both panels are simply in the same partition. Reset restores the two different sites and all the starting selections. The simulation does not read or change browser storage.

There is another way for the keys to match, even when the top-level sites differ. Consider the original two sites, still under the partitioned policy. This time, suppose there is evidence that the panel on a.test has access to unpartitioned cookies. That grant is an input about context A, not a permission conferred on every copy of the panel.

  • With a grant only in A, A selects embed.test, while B still selects b.test|embed.test. Access has changed in A, but the two keys are still separate.
  • With grants in both contexts, both select embed.test. This time they share the unpartitioned cookie key, not a partition for one top-level site.
  • Keep both grants at yes but compare other-storage instead. The example treats that API as separately partitioned: neither cookie grant is used, so A and B again select different site-specific keys.

The policy matters before any grants are considered. Under the example's origin-only policy, embed.test is the key in both contexts without consulting either grant. Under blocked, neither context has access. That is different from separate, where each context has an accessible key of its own.

With partitioned cookies and both grants set to yes, the modeled keys match. Switch to other storage: both grant selectors become unevaluated, and the distinct top-level sites yield distinct keys. Do not extrapolate cookie access to a grant for every browser storage mechanism. The example uses explicit policies, not a detection of the visitor's browser settings.

In practice

If an embedded preference appears on one site but not the other, first identify the storage API that holds it. Then compare the top-level sites, the embedded origin, and the policy for that API in the browser version at issue. For cookies, distinguish an observed grant in one context from a grant in both. Mozilla's documented Firefox policy illustrates why cookie exceptions deserve separate attention; it is not a rule for every browser or API.

If the policy or a relevant cookie grant is unknown, leave the comparison unresolved. An unknown grant is not a denial. Do not clear data or change permissions on the strength of the example. Even a known key tells you where the panel can look, not what it will find there.

Frequently asked questions

Editorial questions based on the listed sources and explicitly labeled local examples.

Is a site the same as an origin?

No. Origin distinguishes scheme, host and port for tuple origins; a schemeful site groups eligible hosts by registrable domain and scheme. Browser partitioning uses its applicable storage-key policy. This example supplies site labels instead of computing browser site identity.

Does partitioning erase existing data?

Not necessarily. In this example, a partitioning policy changes the selected storage access key. That result is not a deletion or migration operation and does not establish a particular browser version’s handling of existing data.

Does a cookie storage grant unpartition every API?

No general guarantee. Browser and API policy matters. The example deliberately treats cookie grants separately from other partitioned storage.

Does partitioning make tracking impossible?

No. Partitioning changes a class of cross-context state access; it does not establish anonymity. The model distinguishes cookie-access grants from other storage. Check the actual browser and API policy rather than generalizing a cookie result.

Sources & model boundaries

Primary references used for this explanation. The interactive example is an educational model, not a live check.

  1. Mozilla state partitioning

    State partitioning. Documented Firefox state partitioning distinguishes top-level-site storage keys and cookie access exceptions. Browser-specific rules must be scoped.

    Checked .

  2. HTML: origins and sites

    Section 7.1.1.1 (origins and sites). Tuple origins distinguish scheme, host and port; eligible schemeful sites group hosts by scheme and registrable domain. The example supplies site labels, not computed identity.

    Checked .

Report an issue. Include the article URL and ID, not passwords or access keys.