To clear cache of WebView, I have used
webview.getSettings().setAppCacheEnabled(false);
webview.clearCache(true);
webview.loadUrl("about:blank");
webview.reload()
or
deleteDatabase("webview.db");
deleteDatabase("webviewCache.db");
or
webview.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
webview.clearCache(true);
webview.clearHistory();
But nothing is clearing cache. Any suggestion??
I have been trying to figure out the way to clear the cache, but all we could do from the above mentioned methods was remove the local files, but it never clean the RAM.
The API clearCache, frees up the RAM used by the webview and hence mandates that the webpage be loaded again.
Clears the resource cache.
Note that the cache is per-application, so this will clear the cache for all WebViews used.
Suggested: To clear all the webview caches while you signOUT form your APP:
For Lollipop and above:
To clear all the webview caches while you signOUT form your APP:
For Lollipop and above:
To clear the history, simply do: