The Broadcast Channel API allows basic communication between browsing contexts (that is, windows, tabs, frames, or iframes) and workers on the same origin.
By creating a BroadcastChannel object, you can receive any messages that are posted to it. You don't have to maintain a reference to the frames or workers you wish to communicate with: they can “subscribe” to a particular channel by constructing their own BroadcastChannel with the same name, and have bi-directional communication between all of them.
BroadcastChannel
This library implements:
The BroadcastChannel block represents a named channel that any browsing context of a given origin can subscribe to. It allows communication between different documents (in different windows, tabs, frames or iframes) of the same origin. Messages are broadcasted via a message event fired at all BroadcastChannel objects listening to the channel.
Implement the OnMessage to handle incoming messages
Use the BroadcastChannel_PostMessage method to send a message to a channel.
The WidgetID is the name of the block, and is mandatory input for the post message method.
Some use cases for broadcast channels include:
Check out the demo app of an online store where if you add a product to the cart all open tabs will update the cart automatically.
Even Amazon cant do this ;)