Testing

BroadcastChannel API: Browser Support, Features, Use Cases

The BroadcastChannel API supports Chrome 54+, Edge 79+, Firefox 38+, Safari 15.4+, Opera 41+, and Samsung Internet 7.2+. Learn browser support, features, use cases.

Author

Prince Dewani

May 1, 2026

The BroadcastChannel API is a WHATWG HTML Living Standard interface that lets pages, iframes, and workers from the same origin exchange messages over a named channel. It supports Chrome 54+, Edge 79+, Firefox 38+, Safari 15.4+ on macOS and iOS, Opera 41+, and Samsung Internet 7.2+, while Internet Explorer never added support.

This guide covers what the BroadcastChannel API is, the browsers that support it, key features, use cases, differences from postMessage and SharedWorker, and known issues.

What is the BroadcastChannel API?

The BroadcastChannel API is a JavaScript interface defined in the WHATWG HTML Living Standard. It creates a one-to-many message bus between browsing contexts that share the same origin. Pages, iframes, web workers, shared workers, and service workers can all join a named channel and receive messages posted to it.

Which browsers does the BroadcastChannel API support?

The BroadcastChannel API works in every modern Chromium, Gecko, and WebKit browser, while Internet Explorer and Microsoft Edge Legacy never added the constructor.

Loading browser compatibility data...

BroadcastChannel compatibility in Chrome

Chrome supports the BroadcastChannel API from Chrome 54 on desktop and Chrome for Android. Every Chrome release since Chrome 54 ships the BroadcastChannel constructor on by default; no flag is needed and structured-cloneable payloads pass through without setup.

BroadcastChannel compatibility in Edge

Microsoft Edge supports the BroadcastChannel API from Edge 79 on Windows, macOS, and Linux, the version that switched Edge to the Chromium engine. Edge 12 to 18 ran on EdgeHTML and did not include the BroadcastChannel constructor, so enterprise Windows fleets on Edge Legacy still need a fallback.

BroadcastChannel compatibility in Firefox

Firefox supports the BroadcastChannel API from Firefox 38 on desktop and Firefox for Android. The API has shipped on by default in every Firefox release since, including Firefox ESR builds used in long-support enterprise environments.

BroadcastChannel compatibility in Safari

Safari supports the BroadcastChannel API from Safari 15.4 on macOS and iOS Safari 15.4 on iPhone and iPad. Earlier Safari versions did not include the BroadcastChannel constructor, so any site that still sees iOS 14 or macOS Big Sur traffic needs a localStorage storage-event fallback.

BroadcastChannel compatibility in Opera

Opera supports the BroadcastChannel API from Opera 41 on desktop and Opera Mobile 80 on Android. Coverage tracks Chromium because every Opera build since Opera 15 is Chromium-based, so Opera GX inherits the same support window.

BroadcastChannel compatibility in Samsung Internet

Samsung Internet supports the BroadcastChannel API from Samsung Internet 7.2 on Android. Galaxy phones and tablets that ship with Samsung Internet 7.2 and later inherit support automatically, since the browser tracks Chromium upstream.

BroadcastChannel compatibility in Android Browser

WebView on Android supports the BroadcastChannel API in step with Chrome for Android, so apps that embed a WebView running Chromium 54 or later get the BroadcastChannel constructor for free. The legacy stock Android Browser, frozen at Android 4.4, does not support it.

BroadcastChannel compatibility in Internet Explorer

Internet Explorer never added BroadcastChannel support. IE 5.5 through IE 11 reach the page without the BroadcastChannel constructor, so feature detection must fall back to localStorage with the storage event. Microsoft has retired Internet Explorer, and IE traffic is now a small slice of enterprise Windows fleets.

Note

Note: BroadcastChannel breaks across older Safari, Edge Legacy, and Internet Explorer. Test it on real browsers and OS with TestMu AI. Try TestMu AI free!

What are the key features of the BroadcastChannel API?

The BroadcastChannel API gives JavaScript a small, easy-to-use pub/sub bus for same-origin tabs, frames, and workers, with structured cloning of any serializable payload.

  • Named channels: The BroadcastChannel constructor takes a string. Every context that constructs a channel with the same name joins the same bus.
  • postMessage method: postMessage broadcasts any structured-cloneable value to every BroadcastChannel that shares the channel name, except the sender itself.
  • message event: Receivers attach an onmessage handler or an addEventListener('message') call, and each delivery includes the cloned data on event.data.
  • close method: Calling close on a channel detaches the receiver. The channel goes away once every BroadcastChannel for that name has closed.
  • Structured cloning: Payloads can include strings, numbers, arrays, plain objects, Maps, Sets, ArrayBuffers, Blobs, and File objects. Functions, DOM nodes, and class prototypes do not survive the clone.
  • Same-origin scope: Only browsing contexts with the same origin and storage key receive messages, so a malicious site on a different origin cannot eavesdrop.
  • Worker-friendly: Web workers, shared workers, and service workers can all construct a BroadcastChannel and join the same bus as the foreground page.

Feature-detect the constructor before you reach for it; the snippet below ships in production code on browsers that lack the API:

// Feature detect BroadcastChannel before constructing one.
if (typeof BroadcastChannel !== 'undefined') {
    const runs = new BroadcastChannel('test-runs');

    runs.postMessage({ status: 'started', runId: 1842 });

    runs.onmessage = (event) => {
        console.log('Run update:', event.data);
    };
} else {
    console.warn('BroadcastChannel not supported. Falling back to localStorage events.');
}

What are the common use cases of the BroadcastChannel API?

Web apps reach for the BroadcastChannel API any time the same user has multiple tabs open and one tab needs to tell the others about a state change.

  • Synchronized logout across tabs: When the user signs out in one tab, the auth handler posts a logout event so every other tab from the same origin clears local state and routes back to the login screen.
  • Live theme and language updates: Switching dark mode or language in one tab posts an event that every other tab subscribes to and re-renders without a full reload.
  • Cross-tab cache invalidation: A successful POST in tab A broadcasts a "stale: orders" event, so tab B refetches the orders endpoint instead of serving a stale cached response.
  • Service worker coordination: A service worker waits for skipWaiting messages from an active page, then activates and refreshes every connected tab through the same channel.
  • Multi-tab form autofill: A single form draft synced through BroadcastChannel lets the user start typing in one tab and finish in another without losing input.
  • Real-time dashboards: Slack, Trello, Notion, and Figma all use a same-origin tab bus to keep notifications, presence indicators, and unread counts consistent across every open workspace tab.
...

How does BroadcastChannel differ from postMessage and SharedWorker?

BroadcastChannel, window.postMessage, and SharedWorker all move data between same-origin contexts, but they differ on who can talk, how the connection is set up, and what guarantees the runtime offers. The table below lays out the trade-offs that drive the choice in production code.

DimensionBroadcastChannelwindow.postMessageSharedWorker
Communication scopeEvery same-origin tab, iframe, and worker that joined the channel by nameOne specific window or worker reference you already holdEvery same-origin page that connected to the same shared worker script
SetupConstruct a channel by name; no handshakeNeed a reference to the target window, frame, or workerSpin up a SharedWorker script then connect through its port
RecipientsAll BroadcastChannel objects with the same name, except the senderExactly one target you addressedAll connected MessagePort objects
Ordering and deliveryBest-effort fan-out, no acknowledgementDirect, ordered to the target you addressedDirect, ordered through the shared worker
Browser supportChrome 54+, Edge 79+, Firefox 38+, Safari 15.4+All modern browsers and Internet Explorer 10+Chrome 4+, Firefox 29+, Safari 16+; not in Edge Legacy or IE
Best fitBroadcasting app state to every same-origin tabTalking to one frame, popup, or web workerPooling shared work across tabs in one background script

What are the known issues with the BroadcastChannel API?

BroadcastChannel is well established, but production code still has to plan around several real constraints that the spec is explicit about.

  • Same-origin only: BroadcastChannel checks the origin and storage key on every delivery. A page on app.example.com cannot exchange messages with a page on payments.example.com, even though both are subdomains of example.com.
  • Same-device, same-browser only: The bus runs inside one browser process tree on one device. It is not a server-sent or peer-to-peer transport, so it cannot push state to a different machine, a different browser profile, or a different incognito session.
  • Structured-clone limits: Functions, DOM nodes, getters, and class prototypes do not survive postMessage. Sending a class instance lands as a plain object on the receiving side, which surprises code that calls instance methods after delivery.
  • No delivery acknowledgement: postMessage returns immediately. There is no built-in delivered event or retry, so coordinating critical state still needs an idempotent receiver and a reconcile step on tab focus.
  • Older Safari fallback: Safari versions before 15.4 do not include the BroadcastChannel constructor. Sites that still see iOS 14 traffic need a localStorage storage-event fallback or a small polyfill.
  • Edge Legacy and IE blank spot: Microsoft Edge before 79 and every Internet Explorer build skip the API entirely. Enterprise Windows fleets on those browsers need a fallback path.
  • Jest test environment: jsdom does not implement BroadcastChannel, so unit tests that hit the API need a manual mock or a Node 16+ polyfill before they can run green.

In my experience, the most common production bug is assuming structured cloning preserves class instances. A receiver that calls instance.refresh() after a postMessage works in development with a single tab and breaks the moment a second tab joins the channel. Always serialize to plain objects and rehydrate on the receiver side.

...

Citations

All BroadcastChannel API version numbers and platform notes in this guide come from these primary sources:

Author

Prince Dewani is a Community Contributor at TestMu AI, where he manages content strategies around software testing, QA, and test automation. He is certified in Selenium, Cypress, Playwright, Appium, Automation Testing, and KaneAI. Prince has also presented academic research at the international conference PBCON-01. He further specializes in on-page SEO, bridging marketing with core testing technologies. On LinkedIn, he is followed by 4,300+ QA engineers, developers, DevOps experts, tech leaders, and AI-focused practitioners in the global testing community.

Open in ChatGPT Icon

Open in ChatGPT

Open in Claude Icon

Open in Claude

Open in Perplexity Icon

Open in Perplexity

Open in Grok Icon

Open in Grok

Open in Gemini AI Icon

Open in Gemini AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Frequently asked questions

Did you find this page helpful?

More Related Hubs

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests