BroadcastChannel
Lets tabs and frames of the same site send messages to each other instantly.
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
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 54 | 2016-10-12 | None |
| Edge | Supported | 79 | 2020-01-15 | None |
| Firefox | Supported | 38 | 2015-05-12 | None |
| Safari | Supported | 15.4 | 2022-03-14 | None |
| Safari on iPhone | Supported | 15.4 | 2022-03-14 | None |
| Chrome on Android | Supported | 54 | 2016-10-19 | None |
| Samsung Internet | Supported | 6.0 | 2017-08-23 | None |
How a site asks for it
| API | new BroadcastChannel(name).postMessage(data) |
| Browser compat keys | api.BroadcastChannel |
| How access is granted | none |
| What the user sees | None |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| How long it lasts | While at least one context is open |
| How to take it back | Clear site data, browser privacy settings |
| Inside an iframe | Not 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
| Type | Example | Apps |
|---|---|---|
| security | You sign out on one tab of a web app and every other open tab of that app locks too. | None named |
| shopping | You add an item to your cart in one tab and the count updates in all your other tabs. | None named |
| games | A browser game warns you if you open it in a second tab, so two copies do not fight over the same save. | None named |
| messaging | A web chat marks messages read in every tab as soon as you read them in one. | Slack, WhatsApp Web |
| productivity | A document editor tells other tabs that you changed a setting, such as dark mode. | None named |
| video | A web player pauses in one tab when you start another video in a second tab. | YouTube |
| ads | A 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
- MDN: Broadcast Channel API. Documents how pages of the same site can send messages to each other across tabs.
Good uses and abuse
Legitimate uses
- Multi tab logout, state sync
Known abuse
- Cross-site ID sync before partitioning
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 1 of 5 | How revealing the data is |
| Utility | 3 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | Not rated | Rough identifying entropy, when known |
History
- 2022-03, Safari 15.4: Shipped in Safari
- 2023-07, Chrome 115: Partitioned by top level site
Related capabilities
Related
- 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.