Comparison
Conditional requestvsImmutable caching
Conditional request
the browser asked whether its copy was still current and got back a 304 with no body at all.
A request carrying a validator from a previously cached response, so the server can answer 304 Not Modified instead of resending the body. It saves the payload but not the round trip, which is why a page full of revalidations still feels slow on a high-latency connection. Assets with a content hash in the name should never reach this path, because they should be cached as immutable instead.
Full entry →Immutable caching
the JavaScript is cached for a year because its name guarantees the contents can never change.
Serving hashed assets with a very long max-age and the `immutable` directive, so the browser does not even revalidate them. It is the payoff for content hashing and the single biggest win for repeat visits. It is also unforgiving: an unhashed file served this way is stuck in caches you do not control until the max-age expires.
Full entry →