Android Question Webview 300 ms delay

Discussion in 'Android Questions' started by Devv, Oct 9, 2019 at 10:43 AM.

  1. Devv

    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
     
  2. JohnC

    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:
    Code:
    WV.ZoomEnabled = False
    It appears disabling zoom might remove the 300ms delay

    or

    2) Use the webViewExtras lib and do this:
    Code:
    wve.addWebChromeClient(wv, "WVE")
    Maybe adding the Chromeclient to the webview will fix this issue.
     
    Last edited: Oct 10, 2019 at 6:16 AM
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice