I\'ve got a WebView in my app. When the user logs out of my app, I\'d like to delete all cached resources the WebView may have created. Looking at an emulator, I see the fol
try this
mWebView.clearCache(true);
mContext.deleteDatabase("webview.db");
mContext.deleteDatabase("webviewCache.db");
This is the only code that saved my day!!
CookieSyncManager.createInstance(this);
CookieManager cookieManager = CookieManager.getInstance();
cookieManager.removeAllCookie();
My scenario:
Only posting here because commenting can be ugly
clearCache() will work because:
From the doc:
Clear the resource cache. Note that the cache is per-application, so this will clear the cache for all WebViews used.