3 ms·
It's a combination of different headers that's hard to sum up in a short comment. A good article on the subject should talk about all these headers: Expires,
by tyingq 5y ago
It's a combination of different headers that's hard to sum up in a short comment. A good article on the subject should talk about all these headers: Expires, Cache-control, Etag, Pragma, Vary, Last-Modified
Key CDN has an article on it. They certainly would have experience and expertise there. I didn't read the whole thing, but it seems to have it covered: https://www.keycdn.com/blog/http-cache-headers https://www.keycdn.com/blog/http-cache-headers
There's also some interesting exceptions where rules aren't followed. Like browsers typically have a completely separate cache for favicons. I suppose because they use the icons in funny/different ways, like bookmarks.
There are also sometimes proxies (especially corporate MITM ones) that don't follow the rules. Hence the popularity of cache-busting parameters like you described.
- djbusby 5y agoI get the desired effect without Expires and Pragma, primarily using Cache-Control: no-store (or something I copied from MDN).
- nesarkvechnep 5y agoBut no-store makes the resource uncacheable by both intermediate caches and browsers.