1

I finally managed to get HTML5 cache work, but I can't find any solution how to control how long cache given elements. Google Page Speed is showing that cached elements should have expiration date.

I would be grateful if you could provide any tips concerning that issue.

Adam W
  • 73
  • 2
  • 7

1 Answers1

2

From http://www.w3.org/TR/html5/browsers.html#offline

5.7.7 Expiring application caches

As a general rule, user agents should not expire application caches, except on request from the user, or after having been left unused for an extended period of time.

Application caches and cookies have similar implications with respect to privacy (e.g. if the site can identify the user when providing the cache, it can store data in the cache that can be used for cookie resurrection). Implementors are therefore encouraged to expose application caches in a manner related to HTTP cookies, allowing caches to be expunged together with cookies and other origin-specific data.

For example, a user agent could have a "delete site-specific data" feature that clears all cookies, application caches, local storage, databases, etc, from an origin all at once.

About the Google Page Speed warning, it is most likely to be on the SERVER-side.

You should take a look at your server config files, or perhaps your .htaccess files.

Related : https://stackoverflow.com/search?q=html5+cache+control

and from : HTML 5 Cache Manifest Vs. Etags, Expires or cache-control header

Here are some resources that will get you started:

Community
  • 1
  • 1
Milche Patern
  • 17,400
  • 6
  • 31
  • 52