IT lexicon › Web › BroadcastChannel

BroadcastChannel

Web På svenska → Updated: 2026-05-23

Browser API that lets tabs, iframes and workers from the same origin talk to each other over a named channel — no server needed.

The API is minimal: new BroadcastChannel('name'), postMessage, onmessage. The sender doesn't see its own messages. Works between regular tabs, service workers, shared workers and dedicated workers as long as the origin matches.

Common uses: syncing login/logout across tabs, cache invalidation, signalling "new version available" from a service worker. Alternatives like localStorage events and SharedWorker exist but are clumsier.

← Back to the lexicon