如何清除所有WebView存储的信息? [英] How to clear all WebView stored information?

查看:152
本文介绍了如何清除所有WebView存储的信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Android浏览器,并且可以选择清除缓存,存储,Cookie等.

I have an Android browser and I have the option to clear cache, storage, cookies, etc.

代码如下:

webView.clearCache(true);
webView.clearFormData();
webView.clearHistory();
webView.clearSslPreferences();
CookieManager.getInstance().removeAllCookies(null);
CookieManager.getInstance().flush();

这似乎对我所有的测试都有效,但是当我访问google.com时,我的旧搜索仍然存在.我不清理什么?

And this seems to work on all my tests but when I go to google.com my old searches are still there. What am I not clearing?

谢谢.

推荐答案

找到了解决方案:

WebStorage.getInstance().deleteAllData();

这篇关于如何清除所有WebView存储的信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆