I'm writing a Chrome Desktop app with a webview. I'd like to clear all data, including cache and cookies.
I've found this possibly related thread, but it doesn't seem to be working: https://code.google.com/p/chromium/issues/detail?id=174763
Any idea? The best solution would be to use a webview with persistent storage, but also an in-memory solution could suffice.
As of Chrome 33, you can use the webview.clearData() method to clear some types of data, including cookies. However this will not clear cache.
An alternative is to use a unique partition ID each time you create your webview. This will force the new webview to use a different storage partition each time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With