Clearing all cached items created by a WebView?

后端 未结 3 1462
借酒劲吻你
借酒劲吻你 2021-01-05 01:16

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

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-05 01:39

    try this

    mWebView.clearCache(true);
    mContext.deleteDatabase("webview.db");
    mContext.deleteDatabase("webviewCache.db");
    

提交回复
热议问题