Skip to main content

6. Relationship to Applications and Other Caches

Applications that use HTTP often specify other forms of caching. For example, Web browsers often have history mechanisms such as "Back" buttons that can be used to redisplay a representation retrieved earlier in a session.

Likewise, some Web browsers implement caching of images and other assets within a page view; they might or might not honor HTTP caching semantics.

The requirements in this specification do not necessarily apply to how an application uses data after it retrieves it from an HTTP cache. For example, a history mechanism can display a previous representation even if it has expired, and an application can use cached data in other ways outside of its freshness lifetime.

This specification does not prohibit applications from considering HTTP caching; for example, a history mechanism might tell the user that a view is stale, or it might honor cache directives (e.g., Cache-Control: no-store).

However, when an application caches data and does not make it obvious to the user or does not easily allow the user to control it, it is strongly encouraged to define its operation in relation to HTTP cache directives so as to avoid surprising authors who expect cache semantics to be honored. For example, while it might be reasonable to define an application cache "on top of" HTTP that allows responses containing Cache-Control: no-store to be reused for requests directly related to the one that fetched it (such as requests created during the same page load), allowing it to be reused for requests completely unrelated to the one that fetched it might be surprising and confusing to users and authors.