title: HTML5 localstorage in Cordova
body: <p>Does HTML5 Local Storage work in Cordova / PhoneGap? I am trying to use it, both the HTML5 way and the way specified in the docs. Neither work.</p>
  
  <p>Specifically, I am trying to use an ajax query result for local storage. I have tested the query, and it works.</p>
  
  <p></p>
  
  <pre><code>&lt;head&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
      &lt;meta name="format-detection" content="telephone=no"&gt;
      &lt;meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi"&gt;
      &lt;title&gt;Hello World&lt;/title&gt;
      &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js" type="text/javascript"&gt;
  
      &lt;/script&gt;
      &lt;script type="text/javascript"&gt;
          $(document).ready(function () {
              $("form").submit(function () {
  
                  var uname = document.getElementById("username").value;
                  var pword = document.getElementById("password").value;
                  var postData = {
                      username: uname,
                      password: pword
                  };
  
                  $.ajax({
                      url: "http://www.yellowcabsavannah.com/test.php",
                      type: "POST",
                      data: postData,
                      async: false,
                      dataType: 'json',
                      cache: false,
                      success: function (data) {
                          localStorage.uname = data.username;
                          localStorage.pword = data.password;
                          alert(localStorage.uname);
                      }
                  }
                  });
              return false;
              });
          });
      &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;form action=""&gt;
          &lt;input type='text' id="username" name="username" placeholder="Username"&gt;
          &lt;br&gt;
          &lt;input type='password' id="password" name="password" placeholder="password"&gt;
          &lt;br&gt;
          &lt;input type="submit" id="submit" value="Login"&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p></p>