SessionStorage (same than localStorage but w/o persistence)
SharedWorker (oups, deprecated !)
ServiceWorker (postMessage and loop other all opened window instances to broadcast message).
If all tabs are attached because opened from the same source page (const child = window.open()), you can communicate using the instance and window.opener.
SharedWorker is not deprecated, right? MDN says nothing about that. It's probably the most well-supported way of doing this although BroadcastChannel has much better DX.
Also the npm package broadcast-channel does this with fallbacks to non-native BroadcastChannel alternatives i.e. localStorage (for IE) and idb.
SharedWorker was flagged “removed” from WebKit spec and IE didn’t plan to implement it.
The main reason for the dismiss is the ServiceWorker API that appeared soon after and can handle all the SharedWorker API.
Some other possibilities :
const child = window.open()
), you can communicate using the instance and window.opener.SharedWorker is not deprecated, right? MDN says nothing about that. It's probably the most well-supported way of doing this although BroadcastChannel has much better DX.
Also the npm package
broadcast-channel
does this with fallbacks to non-native BroadcastChannel alternatives i.e. localStorage (for IE) and idb.SharedWorker was flagged “removed” from WebKit spec and IE didn’t plan to implement it.
The main reason for the dismiss is the ServiceWorker API that appeared soon after and can handle all the SharedWorker API.
Ah I see, TIL. Thanks!