title: PhantomJS not persisting localStorage consistently
body: <p>I am trying to make an isolated test case to experiment with PhantomJS <code>localStorage</code> behavior, but in my testCase, localStorage does not appear to be persistent.</p>
  
  <p>Here is the PhantomJS script:</p>
  
  <pre><code>var page = require('webpage').create();
  page.open('http://localhost:8080/myapp/test.html', function() {
    var x;
    x = page.evaluate(function() {
      return localStorage.getItem("foo");
    });
    console.log(x);
    phantom.exit();
  });
  </code></pre>
  
  <p>When test.html has a call to <code>localStorage.setItem("foo", "bar")</code> the script displays "bar" as i expect.  But when I remove the <code>localStorage.setItem</code> call from test.html, the script  prints out a blank line instead - even though the item should be in localStorage from the previous invocation.</p>
  
  <p>From more complex tests on my real application, localStorage <em>is</em> persisting.  I'm not sure what the trigger is that makes changes to localStorage stick with PhantomJS.</p>
  
  <p>I got identical results with PhantomJS 1.9.7 on Windows and 1.9.1 on Linux.</p>