I had to implement a similar thing before for a chat application where we stored the chat state in local storage. I went with the window.addEvenLister('storage') approach because I had to support IE 11 and Safari.
Hope BroadcastChannel will get more support on older browsers, it seems nice and simple. :)
I had to implement a similar thing before for a chat application where we stored the chat state in local storage. I went with the
window.addEvenLister('storage')
approach because I had to support IE 11 and Safari.Hope
BroadcastChannel
will get more support on older browsers, it seems nice and simple. :)I made a tiny cross-browser lib (github.com/vitkarpov/tabs-channel) for that. Works even on different domains.