WebView saves the page to the cache and, if possible, does not load it, but takes it from there. What will happen. if the content changes on the page? Does webview somehow check the relevance of a cached page?

    1 answer 1

    With a normal page load, the cache is checked and updated as necessary. In other cases (for example, when navigating backwards), the void setCacheMode (int mode) method is responsible for this; its default attribute is LOAD_DEFAULT (the content is taken from the cache if it is available and has not expired, otherwise it is loaded)

    Other attributes of this method are:

    LOAD_CACHE_ELSE_NETWORK - use even expired cache

    LOAD_NO_CACHE - the cache is not used

    LOAD_CACHE_ONLY - no network, only cache

    • "cache is checked and updated as necessary." Those. webview ensures that the content of the page, in the presence of the Internet, is always up to date with me?) - ManGust
    • @ManGust [ developer.android.com/reference/android/webkit/ ... For a normal page load - yes, according to the documentation, Catster