Cordova Web view cache clear in android

前端 未结 2 1522
一个人的身影
一个人的身影 2021-01-14 11:09

I am trying to clear the cache stored in android application which uses cordova webview. I tried with cordovaWebView.clearCache(true); Also tried with

相关标签:
2条回答
  • I'm using the "cordova-plugin-cache-clear" plugin

    https://github.com/anrip/cordova-plugin-cache-clear

    To use the plugin, simply call window.CacheClear(success, error);

    and it cleans the webView cache.

    0 讨论(0)
  • 2021-01-14 12:05

    Simplest answer to this is

    cordovaWebView.clearCache(true);
     android.webkit.CookieManager.getInstance().removeAllCookie();
    

    cordovaWebView is the instance of Cordovawebview.

    Use both in the event where you need to clear the cookie and cache.

    0 讨论(0)
提交回复
热议问题