demo ยท v133
SharedWorker and BroadcastChannel partitioning
Before partitioning, an embedded third-party iframe on news.example and on shop.example would attach to the same SharedWorker instance — a clean cross-site identity channel. Today, each top-level site gets its own SharedWorker instance for the same worker URL. Same for BroadcastChannel.
pre-115 (legacy)
// embedded on news.example
const sw1 = new SharedWorker("/track.js");
// embedded on shop.example
const sw2 = new SharedWorker("/track.js");
// sw1 === sw2 (same instance)
// โ
// the iframe can recognise the user
// across the two parents.
Chrome 133 (partitioned, default)
// embedded on news.example
const sw1 = new SharedWorker("/track.js");
// embedded on shop.example
const sw2 = new SharedWorker("/track.js");
// sw1 !== sw2 (separate instances)
// partition key: (top-level site, frame origin)
// no cross-site identification possible.
This page is embedded as the top-level site. Open the demo inside an iframe whose parent is a different site to see the partition keys diverge. The probe below shows the current partition perspective.
this document's partition perspective
top-level origin
—
frame origin—
is top-level—
SharedWorker support—
BroadcastChannel ping—