demo · v133

Storage Partitioning

Write to localStorage, send through a BroadcastChannel, and check the SW registration scope — all in this top-level context. Open the same demo from a different top-level site (or embedded as a third-party iframe) and the storage will be empty there. Chrome 133 finishes the partitioning rollout.

top-level site
document.origin

checking support…

the code

// Chrome 133+: localStorage / IndexedDB / SW / BroadcastChannel
// are keyed by (top-level site, embedded origin).
localStorage.setItem("hello", "world");

// As a third-party iframe on a different top-level site,
// this read returns null even from the same origin:
localStorage.getItem("hello"); // null in a different partition

see also