title: using local session to maintain state
body: <p>I want to use local session storage to maintain state in my web app, especially if/when the user opens several tabs in his browser.</p>
  
  <p>I have some data that is injected in the HTML on the server. In the document.ready section of the page, I have something like this:</p>
  
  <pre><code>MyStorage = window.sessionStorage;
  MyStorage.setItem('MyVar', $('#TheVar').html());
  </code></pre>
  
  <p>If later on I write this:</p>
  
  <pre><code>ThisVar = MyStorage.getItem('MyVar');
  ThisVar = 3;
  </code></pre>
  
  <p>Will the value in the session storage also become 3? And, will the value of all the variables ThisVar in other tabs also be 3 when I change the value of ThisVar in one tab?</p>
  
  <p>Thanks.</p>