demo · v144

Cross-tab Coordination

Shared Storage was advertised as the place to keep cross-tab, cross-origin counters and flags. For first-party cross-tab needs (the most common case), BroadcastChannel + IndexedDB does the job — standards-track, no Privacy Sandbox dependency. Open this page in two tabs and watch them sync.

Shared Storage is removed in Chrome 144. Open this page in two browser tabs, click around in one — the other updates within ~50ms via BroadcastChannel. State persists in IndexedDB so a reload keeps the count.

BroadcastChannel: checking… · IndexedDB: checking… · sharedStorage: checking…

tab id:

shared counter (IDB-backed)

written via IDB, broadcast to all tabs. Reload — value persists.

0

last writer:

message bus

everything sent / received on this origin

the API (replacement)

// shared cross-tab state on one origin
const bc = new BroadcastChannel("counters");
bc.addEventListener("message", (e) => refreshUI(e.data));

async function inc() {
  const db = await openDB("counters");
  const cur = await db.get("v") ?? 0;
  await db.put("v", cur + 1);
  bc.postMessage({ kind: "tick", value: cur + 1 });
}

For cross-origin coordination that Shared Storage tried to enable, there is no general replacement — that was the privacy-sandbox-specific bit. Most first-party use cases (multi-tab apps, shared counters, work queues, live cursors) only ever needed BroadcastChannel.

see also