Li Che Li Che - 1 year ago 137
Android Question

Android webview apply start too slowly.

I created an android application. It uses a

WebView
to upload local html. But it starts very slowly. It uploads the page in about 10 seconds. Why it is so slow? What method can let the application starts faster?

Answer Source

Try using this - This will enable cache in your webview thus might help you load pages faster.

 WebSettings webSettings = webview.getSettings();
 webSettings.setPluginsEnabled(true);
 webSettings.setJavaScriptEnabled(true);
 webSettings.setDatabaseEnabled(true);
 webSettings.setDomStorageEnabled(true);
 webSettings.setAppCacheEnabled(true);
 webSettings.setCacheMode(WebSettings.LOAD_NO_CACHE);

this snippet is for loading any page faster, if you specifically want to load local pages only try using example explained on This Link.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download