Android webview check if page is in cache

十年热恋 提交于 2020-01-06 01:29:05

问题



in my app i'm using a webview to load a website for mobile devices. I've set up the webview for caching successfully. But if the device is offline and the user wants to visit a page which wasn't visited before it cannot be shown. This is clear because for a non visited page there is no counterpart in the cache. Therefore the webview shows the "Page not available" page.

So to my question:
Is it possible to check if a page exists in the cache before loading it in the webview?

kind regards
Christian

来源:https://stackoverflow.com/questions/25748855/android-webview-check-if-page-is-in-cache

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!