0

I was looking at Offline Web Applications using an HTML5 Cache Manifest.

Just wondering, if a user visits the application, and the resources are immediately downloaded for offline use, will they ever be deleted? (without user intervention such as Clear Browsing Data)

For example, someone visits my site, which has several somewhat sizable jpeg files that are used as wallpaper options for my webapp... but he/she may never visit my site again? How long do the offline files last when using a Cache Manifest?

700 Software
  • 85,281
  • 83
  • 234
  • 341
  • this will probably differ from browser to browser. – Woodrow Barlow Jun 27 '16 at 20:11
  • I'm mainly interested in Google Chrome on tablets if it comes to specifics, but information about the general expiration plan for all browsers would be interesting. Is it by disk usage? Number of days without accessing? Something else? – 700 Software Jun 27 '16 at 20:12
  • 1
    Note that the cache manifest / AppCache is (according to Mozilla anyway) [a deprecated technology](https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache). You may want to look into [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers) instead. But see also http://stackoverflow.com/q/28271843/215552 – Heretic Monkey Jun 27 '16 at 20:17

1 Answers1

0

It can be deleted or updated by itself, until the user does something with the manifest file.

Once an application is cached, it remains cached until one of the following happens:

  • The user clears the browser's cache
  • The manifest file is modified
  • The application cache is programmatically updated.
Heretic Monkey
  • 11,687
  • 7
  • 53
  • 122
M.Tanzil
  • 1,987
  • 1
  • 12
  • 28
  • 1
    important note: the manifest file itself needs to change. simply changing one of the resources pointed to by the manifest is not enough to trigger an update... which means if you replace `logo.jpg` on your server with a new version, users who have a cached `logo.jpg` will continue to see the cached version *even if they are online*. – Woodrow Barlow Jun 27 '16 at 20:31