0

I am developing chrome app using webview(https://developer.chrome.com/apps/tags/webview) in chrome app with the following scenarios.

  1. show page content using offline cache file.
  2. app should not read cache file when app is in online.
  3. show custom reset method to clear the cache.

I did 1st scenario, but I unable to reset the cache file when user is in online and also unable reset cache using custom method.

I used the following documention https://developer.chrome.com/extensions/browsingData#method-removeCache

Please help me to fix the cache issues.

Thanks

S.Sathya Priya
  • 470
  • 1
  • 5
  • 19

1 Answers1

2

Try this code if it works on you.

var clearDataType = {
appcache: true,
cache: true, // remove entire cache.
cookies: true,
}

webview.clearData({ since: 0 }, clearDataType, function() {
// Reload webview after clearing browsing data.
});

source

Or try the solution here. And Check this page for more information.

Community
  • 1
  • 1
KENdi
  • 7,576
  • 2
  • 16
  • 31