title: browser sessionStorage. share between tabs?
body: <p>I have some values in my site which I want to clear when the browser is closed. I chose <code>sessionStorage</code> to store those values. When tab is closed they are indeed cleared, and kept if the user presses f5; But if the user opens some link in a different tab these values are unavailable.</p>
  
  <p>How I can share <code>sessionStorage</code> values between all browser tabs with my application?</p>
  
  <p>The use case: put a value in some storage, keep that value accessible in all browser tabs and clear it if all tabs are closed.</p>
  
  <pre><code>if (!sessionStorage.getItem(key)) {
      sessionStorage.setItem(key, defaultValue)
  }
  </code></pre>