title: LocalStorage not working on iPhone - Not in Private Browsing
body: <p>I am trying to Save user input from a textarea in localstorage on the unload of a page and then read it back into a textarea when the user returns. It is working fine in a desktop browser, but doesn't seem to be working on my iPhone. This is not the same as the Private Browsing issues that have been previously answered.</p>
  
  <p>Here is the html:</p>
  
  <pre><code>&lt;html&gt;
   &lt;head&gt;
    &lt;title&gt;Cookie Test&lt;/title&gt;
    &lt;link rel="stylesheet" type="text/css" href="css/site.css"&gt;
   &lt;/head&gt;
   &lt;body class="full" onload="getText()" onunload="saveText()"&gt;
    &lt;div class="fullscreen-overlay" id="fullscreen_overlay"&gt;
    &lt;div class="fullscreen-container js-fullscreen-container"&gt;
    &lt;div class="textarea-wrap"&gt;
    &lt;textarea name="fullscreen-contents" id="fullscreen-contents"&gt;&lt;/textarea&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;/div&gt;
   &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And the Javascript to get and write to localstorage:</p>
  
  <pre><code>var text = document.getElementById('fullscreen-contents');
  
  function saveText() {
    localStorage.savedText = text.value;
    console.log("saved");
  }
  
  function getText() {
    if (localStorage.savedText) {
      text.value = localStorage.savedText;
      console.log("loaded");
    }
  }
  </code></pre>
  
  <p>This is happening in iOS 8 and Private Browsing is not turned on. Any idea what could be going on? Thanks!</p>