Android Question Webview 300 ms delay

Devv

Active Member
Licensed User
i noticed that my webview is laggy

WebViewClient_PageStarted is fired after 300 ~ 500 ms after WebViewClient_OverrideUrl



so the page is not starting loading immediately
it seems to wait a little then start the loading possess


after some googling i found that this is a well know issue called "300ms delay"

some browsers do this delay to detect if there is a double tab

how can i remove the delay ?
i dont care about double tap or any zoom functionality

i only care about the speed of the webview

any ideas are highly appreciated
 

JohnC

Well-Known Member
Licensed User
This page talks about adding a Meta Tag to the html of the page being viewed to remove the 300ms delay:

https://stackoverflow.com/questions/12238587/eliminate-300ms-delay-on-click-events-in-mobile-safari

But the above requires the webpage to have the meta tag in it. If you have no control over the html code of the page being viewed in your webview, then one of two things might work:

1) Do this:
B4X:
WV.ZoomEnabled = False
It appears disabling zoom might remove the 300ms delay

or

2) Use the webViewExtras lib and do this:
B4X:
wve.addWebChromeClient(wv, "WVE")
Maybe adding the Chromeclient to the webview will fix this issue.
 
Last edited:
Top