Skip to Content
Platform.Ontology

BroadcastChannel

Lets tabs and frames of the same site send messages to each other instantly.

Works without askingFiles and storageIn sessionWeb browsersWhile you use it

In one line

Can send messages between open tabs and frames of the same site

Lets tabs and frames of the same site send messages to each other instantly.

A site can see that the same person has several tabs open and sync a login, logout or shopping state. Since partitioning, a tracker embed can no longer message its own copy on a different top site.

What it can and can't do

What the user does: Nothing. It happens while you have the same site open in more than one tab.

It can

  • Pass messages instantly between open tabs of the same site
  • Do things like log out of all tabs or sync a cart
  • Send text or small bits of data

It cannot

  • Reach tabs from other sites
  • Reach tabs that are closed
  • Send messages to other apps on your device

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported542016-10-12None
EdgeSupported792020-01-15None
FirefoxSupported382015-05-12None
SafariSupported15.42022-03-14None
Safari on iPhoneSupported15.42022-03-14None
Chrome on AndroidSupported542016-10-19None
Samsung InternetSupported6.02017-08-23None

How a site asks for it

APInew BroadcastChannel(name).postMessage(data)
Browser compat keysapi.BroadcastChannel
How access is grantednone
What the user seesNone
Needs a secure context (HTTPS)No
Needs a user gestureNo
How long it lastsWhile at least one context is open
How to take it backClear site data, browser privacy settings
Inside an iframeNot listed

Data you get

What comes back: Messages between tabs
Shape: event
How often: live

No individual data fields. The signal is the access itself.

Technical limits

  • Same origin and same storage partition only
  • Messages are structured clones
  • No delivery to closed pages

The story

What it is

Lets tabs and frames of the same site send each other messages instantly.

For you

You never see it. It is why you log out in one tab and every other tab of that site logs out too, or why a cart count updates everywhere.

For makers

It keeps many open tabs in sync with no server round trip. Makers use it for logins, settings and shared state. It only works between pages of the same site.

Where you see it

TypeExampleApps
securityYou sign out on one tab of a web app and every other open tab of that app locks too.None named
shoppingYou add an item to your cart in one tab and the count updates in all your other tabs.None named
gamesA browser game warns you if you open it in a second tab, so two copies do not fight over the same save.None named
messagingA web chat marks messages read in every tab as soon as you read them in one.Slack, WhatsApp Web
productivityA document editor tells other tabs that you changed a setting, such as dark mode.None named
videoA web player pauses in one tab when you start another video in a second tab.YouTube
adsA tracker script on one tab tells a script on another tab of the same site about your visit.None named

Risks

  • Cross tab tracking inside one site
  • Only same site

What the platform says

Good uses and abuse

Legitimate uses

  • Multi tab logout, state sync

Known abuse

  • Cross-site ID sync before partitioning

Scores

ScoreValueMeaning
Sensitivity1 of 5How revealing the data is
Utility3 of 5How useful it is to honest apps
Friction0 of 5How much the user has to do
Fingerprint bitsNot ratedRough identifying entropy, when known

History

  • 2022-03, Safari 15.4: Shipped in Safari
  • 2023-07, Chrome 115: Partitioned by top level site
  • Storage partitioning. Can't use the same embedded storage to recognize you across different sites
  • SharedWorker. Can run one background script shared by all open tabs of the site

Sources

How well checked: Based on official documentation.

On this page