How to clear cache in Cordova/Phonegap app (without removing localstorage)

时间:2017-04-24 17:28:36

标签: javascript cordova caching phonegap

I have a Cordova app and I noticed that its size is increasing every time I navigate the section where there are many images (links from web and not stored on the device).

I think that the reason is that I need to clear webview cache (I use Crosswalk so the webview is based on chromium).

I search around but I can't find a way to clear only cache every time user exits the app. I tried to run window.location.reload(true) on exit but it does not work.

Besides, I have found some plugins that do the job, but they remove all storage data (localstorage too) and I don't want that.

Could you help me with that?

Thanks

0 个答案:

没有答案
相关问题