0

If I remove a file reference from the HTML5 cache manifest, will the browser (mobile Chrome) remove the cached file at some point? I'm concerned about cache size as the files in question are PDFs.

As far as I know, there is no way to programmatically remove a specific file from the cache.

sreimer
  • 4,913
  • 2
  • 33
  • 43
  • Have you had a look at this other [question/answer](http://stackoverflow.com/questions/4542299/once-an-html-document-has-a-manifest-cache-manifest-how-can-you-remove-it)? – summea Apr 17 '13 at 16:56

1 Answers1

1

Yes, as soon as it detects that manifest file has been changed it will download a new version of the application cache. If you want to avoid the PDF files being downloaded again then you should ensure to set HTTP far future expiry headers to maximize the chance of them being re-loaded from the browser cache.

robertc
  • 74,533
  • 18
  • 193
  • 177
  • But will it remove the files that don't exist in the manifest from the existing cache? – sreimer Apr 17 '13 at 21:22
  • @sreimer As I said, as soon as it detects that manifest file has been changed it will *download a new version of the application cache*. The existing cache is discarded when that completes. There is no 'removing from the existing cache' - caches and cache updates are atomic, all or nothing, that's why I explained about expiry headers. – robertc Apr 17 '13 at 22:52