Topic · Protocols
HTTP Caching
Follow a cached response from first download to revalidation, and see which fields decide whether the body is sent again.
A cache reuses a stored response only when freshness or validation permits it. This reading path connects the 304 exchange, the validator comparison rule, and the freshness model.
Reading path
Follow the exchange
- 01 Why Does an HTTP 304 Response Have No Body?A 304 response has no body because the client already holds the selected representation; the status confirms that the stored body is still valid and refreshes its metadata.
- 02 Strong and Weak ETag ComparisonA weak ETag can match a byte-different representation under weak comparison, which ignores the W/ prefix and compares only the opaque tag; strong comparison requires both tags to be strong and identical.
- 03 Freshness and Validation in Cache-ControlA cache can reuse a stored response without contacting the origin while that response is fresh; once it is stale, the cache must validate it conditionally unless a directive explicitly allows stale reuse.
Observe it