title: JavaScript memory and HTML5 LocalStorage limitations on smartphones
body: <p>I'm going to develop <strong>web application</strong> which should work on mobile devices (smartphones). In the application the operator will input some business data, and the operator will type this data also in closed spaces, where network signal can be unavailable.</p>
  
  <p>So, there is a need for <strong>offline mode</strong>. In such mode operator can input data, which will be stored on browser side, and after the network becomes available, the data will be send to the server and persisted in database.</p>
  
  <p>I've found out 2 possible solutions:</p>
  
  <ol>
  <li>Store the values in JavaScript memory. Will not survive browser crash or page reload.</li>
  <li>Store the values in <strong>HTML5 LocalStorage</strong>. Requires browser with HTML5 support and guarantee that this storage will be persistent (no flush after closing the browser app).</li>
  </ol>
  
  <p>Because I've not developed the web application for smartphones yet, and I have little experience with them, I have the question:</p>
  
  <p><em>What are the JavaScript memory and HTML5 LocalStorage limitations for particular browsers on particular smartphones (Android, Windows Mobile, Windows Phone, iPhone)?</em></p>
  
  <p>I know that theoretically HTML5 LocalStorage should be 5MB, and JavaScript memory should depend on device resources, which should be at least 5MB, but how it is for Smartphones? F.g. I've noticed on Windows Phone 6.5, that the <a href="http://www.jstorage.info/" rel="nofollow noreferrer">jStorage</a> page, using <strong>userData</strong> for older IE, is not persisting data on this device (maybe it got flushed after each page refresh, during to limited resources).</p>
  
  <p><strong>update</strong>
  In the <a href="https://stackoverflow.com/questions/2989284/max-size-of-localstorage-values/3260214#3260214">answer to the question of max size of local storage values</a> there's great link to the simple application which tests local storage limitations, and according to the test I've made, the local storage can be increased on Opera Mobile 11 without browser's limitation, the user must simply accept the request for more space. The limits are there the device's limits.</p>
  
  <p>Here's the QR code to the app:</p>
  
  <p><img src="https://i.stack.imgur.com/k0FqR.png" alt="QR code"></p>
  
  <p>And the app itself:
  <a href="http://arty.name/localstorage.html" rel="nofollow noreferrer">http://arty.name/localstorage.html</a></p>