4 ms·
What's the difference between Cache-Control: Immutable and setting expires headers really far in to the future?
by kingkool68 10y ago
What's the difference between Cache-Control: Immutable and setting expires headers really far in to the future?
- imaginenore 10y agoWhen you do a hard refresh (Ctrl + F5 / Apple + R), your cache gets invalidated. The immutable parts don't need to be reloaded, because they are immutable.
- cakoose 10y agoOh, interesting. Is that the only difference? How often people actually do a hard refresh? I would guess most people don't know about that key combination.
- arnorhs 10y agonot only that, but even when you have a resource with a long cache time, and cache-control public, the browser will still do a request for the file headers (a conditional request - one that serves the content if it has changed/doesn't match what the browser expects) so an immutable resource wouldn't even need that request