I’m making an Android application that, among other things, shows websites in a webview. As far as I understand, the webview automatically shows a cached version of the page if a connection can’t be established.
Is there any way to find out if the page shown has been fetched from the server or cache?
Maybe even how old the cached page is.
This is to be able to notify the user if he/she is viewing old information.
You could try a hack – at first set WebView’s cache mode to
WebSettings.NO_CACHEand load the URL. Then, create a custom WebChromeClient like this: