0

If I've interpreted the spec correctly, Cache-Control: no-cache, public would:

  1. allow any intermediate cache to hold a copy (public)
  2. force validation of the response on every request to the intermediate cache, effectively making it not cached (without an ETag but with Expires and Last-Modified)
  3. put a copy in the browser cache

This is all via HTTPS.

Is this the same as must-revalidate? Would this have any effect on performance or would it only waste space in the cache and neutralise the benefits of having a cache?

The objective is to cache files that require a login to improve delivery and reduce bandwidth/server requirements. The files don't change but do require an authenticated user.

antonyh
  • 2,131
  • 2
  • 21
  • 42

1 Answers1

1

no-cache indicates that the cache can be maintained but the cached content is to be re-validated (using ETag for example) from the server before being served. That is, there is still a request to server but for validation and not to download the cached content.

https://kamranahmed.info/blog/2017/03/14/quick-guide-to-http-caching/

Thomas Grainger
  • 2,271
  • 27
  • 34
  • Thanks for the answer. So it can be served from the cache if the origin is not available, and can be cached in the browser and used without revalidation? The linked article doesn't make it clear what 'no-cache' does to browser caches. – antonyh Nov 09 '18 at 14:48