title: writing to and reading from window.localStorage
body: <p>I've worked with localStorage across multiple windows before without any problems, but for some reason in this new application it is not working at all.</p>
  
  <p>I have two pages, PageA and PageB. PageA sets some data in localStorage like so:</p>
  
  <pre><code>var someData = {
      item1: 'foo',
      item2: 'bar'
  };
  window.localStorage.setItem('someKey', JSON.stringify(someData));
  </code></pre>
  
  <p>If I immediately try to read the data via <code>JSON.parse(window.localStorage.getItem('someKey'));</code>, it works fine.</p>
  
  <p>PageA then calls a <code>window.open(PageBURL)</code> to open PageB. In PageB, when I attempt to read the value from localStorage, all I get is <code>null</code>:</p>
  
  <pre><code>JSON.parse(window.localStorage.getItem('someKey')); // gives me null
  </code></pre>
  
  <p>Both pages have identical <code>document.domain</code> values. There must be something stupid I am missing, does anyone have any ideas of things to double check?</p>