JavaScript: sharing data between tabs

javascript

Solution

For a more modern solution check out this answer quoted below:

I'm sticking to the shared local data solution mentioned in the question using `localStorage`. It seems to be the best solution in terms of reliability, efficiency, and browser compatibility.

`localStorage` is implemented in all modern browsers.

The `storage` event fires when other tabs makes changes to `localStorage`. This is quite handy for communication purposes.

Reference: https://developer.mozilla.org/docs/Web/API/Web_Storage_API

Problem

What is the best way to share data between open tabs in a browser?

Original source

Related problems