title: localStorage html5 feature not working in WebView on Samsung Android device
body: <p>I have a html5 application that I wrap with a WebView. To store and retrieve user input values between pages, I use the <strong>localStorage</strong> html5 feature. </p>
  
  <p>It works fine on my Nexus 4 (Android 4.4.4), but it does not work on Samsung Galaxy Tab 2 (Android 4.3.x) (= nothing happens, but also no error in logcat).
  Or, to be more clear: <strong>on Samsung, it does not work if the html pages are loaded from within the app's asset folder</strong>. It does work though if I put the pages on a server, as below in the outcommented line.</p>
  
  <p>However, on Nexus 4, loading from file:///android_asset/ and also if I load the pages on a desktop browser (Chrome, Firefox) from file:// path, it is also working.</p>
  
  <p><strong>Update 1</strong>: I just had another user who reported the issue with a LG device, so it does not seem to be Samsung specific.</p>
  
  <p><strong>Update 2</strong>: Storing and loading the value from localStorage works fine on all devices on the same page, however, not between different pages. In my example, I can store and retrieve the value on 01_home.html, but when I go to another page in the android_asset folder, I cannot read it anymore (on LG, Samsung devices). Works fine on Nexus 4 though.</p>
  
  <p>Below are the settings of the web view.</p>
  
  <pre><code>    webView = (WebView)this.findViewById(R.id.webView);
      webViewClient = new MyWebViewClient(this);
      webViewClient.setSm(sm);
      webView.setWebViewClient(webViewClient);
      WebSettings webSettings = webView.getSettings();
      webSettings.setJavaScriptEnabled(true);
      webSettings.setDomStorageEnabled(true);
      webView.getSettings().setJavaScriptEnabled(true);
      webView.getSettings().setDomStorageEnabled(true);
      webView.getSettings().setPluginState(WebSettings.PluginState.ON);
      webView.getSettings().setAppCacheEnabled(false);
      webView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
      webView.getSettings().setUseWideViewPort(true);
      webView.getSettings().setLoadWithOverviewMode(true);
      webView.getSettings().setBuiltInZoomControls(false);
      webView.getSettings().setSupportZoom(false);
      webView.getSettings().setDefaultZoom(WebSettings.ZoomDensity.FAR);
  
      webView.loadUrl("file:///android_asset/01_home.html"); // does NOT work!
      // webView.loadUrl("http://192.168.178.33/01_home.html"); // does work!
  </code></pre>
  
  <p>Local storage code in the pages:</p>
  
  <pre><code>// storing
  var data = document.getElementById('data').value;
  window.localStorage.setItem((1), data);
  
  // reading
  document.getElementById('data').value = window.localStorage.getItem(1);
  </code></pre>