Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a android WebView load faster?

Anybody has some suggestions to make a webview faster to load the url?

In my situation, I am using the jQuery's getScript to load the javascript(s) when needed.

Thanks, Sana.

like image 813
Sana Avatar asked Sep 16 '10 19:09

Sana


1 Answers

This might not be suitable for your situation, but you could ignore loading images.

       webview.getSettings().setBlockNetworkImage(true);

if targeting api level 8 (2.2) or higher you can take one step further and

       webview.getSettings().setBlockNetworkLoads(true);

More: WebSettings | Android Developers

like image 112
J.G.Sebring Avatar answered Sep 22 '22 13:09

J.G.Sebring