Android WebView not loading second page from cache

后端 未结 5 1295

I have an Android app that simply houses a website. I would like the app to cache the pages of the website for offline use.

I\'m doing a simple test to see if the cache

5条回答
  •  说谎
    说谎 (楼主)
    2021-02-05 21:04

    There are occasions that a WebView cannot be cached natively. If the page header contains the following fields, the WebView will not be able to cache the contents from that page.

    Cache-Control: no-store, no-cache
    Pragma: no-cache
    

    In this case, youwill have to modify the page property on the server to solve the caching problem.

提交回复
热议问题