java - webpage takes a lot of time to load -
in webview in android, first load webpage , display part of using javascript commands. during whole process "loading" message displayed.
problem : take s alot of time load if internet speed fast. (>60 sec always). how reduce time ?
this webviewclient class attach webview (and class contains 1 method):
@override public void onpagefinished(webview view, string url){ view.loadurl("javascript:document.getelementsbyclassname('menu')[0].innerhtml=''"); view.loadurl("javascript:document.getelementsbyclassname('gbh')[0].innerhtml=''"); view.loadurl("javascript:document.getelementsbyclassname('input')[0].innerhtml=''"); view.loadurl("javascript:document.getelementsbyclassname('card_title')[0].innerhtml=''"); view.loadurl("javascript:document.getelementsbyclassname('cell_input')[0].innerhtml=''"); view.loadurl("javascript:document.getelementsbyname('pre')[0].innerhtml=''"); view.loadurl("javascript:document.getelementbyid('footer').innerhtml=''"); view.loadurl("javascript:document.getelementsbyclassname('foot')[0].innerhtml=''"); }
sir, use yslow or google pageload plugins browser, specific tips on how improve page load , speed page.
by default, webview provides no browser-like widgets, not enable javascript , web page errors ignored.
Comments
Post a Comment