Is it possible to enable caching between multiple webviews? Here is the scenario:
I tried webView.getSettings().setCacheMode(WebSettings.LOAD_DEFAULT); but the page (I use a large wikipedia page for testing) is still reloaded from the web instead of using the cache.
According to the documentation, all WebViews in an application share their cache.
However, it looks like Wikipedia always sets the response headers in such a way as to mark the response un-cacheable:
Cache-Control:private, s-maxage=0, max-age=0, must-revalidate
So, I don't think that you're doing anything wrong, nor do I think that there is anything that you can to fix the situation with Wikipedia. Try a different web site, that uses a more 'normal' caching policy, and I'm sure that you will see the WebView's cache working as you expect.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With