HTTP Cache Control max-age, must-revalidate

a) If the server includes this header: Cache-Control “max-age=3600, must-revalidate” it is telling both client caches and proxy caches that once the content is stale (older than 3600 seconds) they must revalidate at the origin server before they can serve the content. This should be the default behavior of caching systems, but the must-revalidate directive … Read more

Is it fine if first response is private with AppCache (Symfony2)?

I have faced same problem. I had to supply ‘public’ headers my cdn. By default when gateway caching is enabled in prod mode, it returns 200 OK with private, nocache must validate headers. I solved problem this way. In app.php, before I send response to user ($respond->send), I have overwritten the cache control header to … Read more

How to prevent Browser cache on Angular 2 site?

angular-cli resolves this by providing an –output-hashing flag for the build command (versions 6/7, for later versions see here). Example usage: ng build –output-hashing=all Bundling & Tree-Shaking provides some details and context. Running ng help build, documents the flag: –output-hashing=none|all|media|bundles (String) Define the output filename cache-busting hashing mode. aliases: -oh <value>, –outputHashing <value> Although this … Read more

what’s the difference between Expires and Cache-Control headers?

Cache-Control was introduced in HTTP/1.1 and offers more options than Expires. They can be used to accomplish the same thing but the data value for Expires is an HTTP date whereas Cache-Control max-age lets you specify a relative amount of time so you could specify “X hours after the page was requested”. HTML Cache control … Read more