2

I am developing a Chrome app that shows some web content in a webview tag. The content is being cached. When I edit the content files, clearing Chrome browsers' cache does not seem to actually clear the webview cache.

One of the posts recommends to assign a unique partition ID every time Chrome app starts. Changing partition ID on the webview does help to clear (or re allocate) the cache, but I still would like to take advantage of caching 3MB of web content and clear it manually only if it changes.

Is there a way to clear that cache, in particular on Chrome OS?

eagle348
  • 21
  • 3

1 Answers1

1

This has since been implemented and is available in Chrome 43+

webviewElement.clearData({}, {cache: true}, function() {
  // Cache cleared
});
Xan
  • 74,770
  • 16
  • 179
  • 206
  • Great, thanks for following up. Originally I was looking for a way to clear it using browser's UI, but with this code I can add a clear cache button in my chrome app. – eagle348 Oct 14 '15 at 14:17