title: Load websites in offline mode
body: <p>I want to load websites from cache when internet is not connected. Here's how I setup the webview in onCreate:</p>
  
  <pre><code>    browse.getSettings().setJavaScriptEnabled(true);
      browse.getSettings().setPluginsEnabled(true);
      browse.getSettings().setLoadWithOverviewMode(true);
      browse.getSettings().setUseWideViewPort(true);
      browse.getSettings().setBuiltInZoomControls(true);
      browse.getSettings().setSupportZoom(true);
      browse.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
      browse.setScrollbarFadingEnabled(true);
      browse.getSettings().setLoadsImagesAutomatically(true);
      browse.getSettings().setAppCacheMaxSize(1024 * 1024 * 100);
      browse.getSettings().setAppCacheEnabled(true);
  
      if (cm.getActiveNetworkInfo().isConnected())
          browse.getSettings().setCacheMode(WebSettings.LOAD_DEFAULT);
      else
          browse.getSettings().setCacheMode(
                  WebSettings.LOAD_CACHE_ELSE_NETWORK);
  
      browse.setWebViewClient(new WebViewClient() {
  
          @Override
          public void onPageStarted(WebView view, String url, Bitmap favicon) {
              // TODO Auto-generated method stub
              super.onPageStarted(view, url, favicon);
              t.setVisibility(TextView.VISIBLE);
          }
  
          @Override
          public void onPageFinished(WebView view, String url) {
              super.onPageFinished(view, url);
              t.setVisibility(TextView.GONE);
          }
      });
  
      try {
          browse.loadUrl(address);
      } catch (Exception e) {
          e.printStackTrace();
      }
  </code></pre>
  
  <p>Here's the <a href="http://www.devahead.com/blog/2012/01/saving-the-android-webview-cache-on-the-sd-card/" rel="nofollow">tutorial</a> I'm following and I'm trying to load the previously visited webpages even if the browser is restarted. Doesn't work! Please help me.    </p>
  
  <p>P.S: I have searched all the related codes on SO, none of them works.</p>