samedi 2 juillet 2016

Android webview loads http page slow on some of mobile operators

I created simple activity with WebView and setJavaScriptEnabled(true) for google recaptcha and some js-function to hide unnecessary elements of page.

I'm trying to load http url (not https) with loadUrl(url). And it's working quite good also if you load through the mobile internet (not WiFi).

But problem is in one of mobile operators - only with one of them loadUrl(url) works so slow (if usual time to load is about 5 seconds, with that mobile operator it increases up to 60 seconds or even more).

Well, web page load fast when I set setJavaScriptEnabled(false). But I need google recaptcha at least so I can't turn this to false.

I suppose that mobile operator add some javascript to html, but when I try to load in Google Chrome or another browser - page load fast with all mobile operators.

Could you tell me, please, how can I boost loading webview like it works in Google Chrome or another browser in Android OS? Or variants to load html and put into webview (smth like okhttp -> webview but it should work with google recaptcha)? Or could you tell, if there any library to replace Webview?

Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire