HTTP cache / validator / 304

Separate ETag, Last-Modified, Cache-Control and 304

Use synthetic headers to separate freshness from revalidation. No real URL is contacted; only a local handoff note is saved.

Four decision axes

ETag is a representation validator, Last-Modified is a date validator, and Cache-Control describes freshness and revalidation. A 304 is returned when a conditional request validator matches.

ETag + If-None-Match → 304 / Last-Modified + If-Modified-Since → 304 / Cache-Control: no-cache → revalidate before use / Cache-Control: max-age → fresh until stale
AxisReview
ETagCompare the representation identifier with If-None-Match.
Last-ModifiedCompare the date with If-Modified-Since.
no-cacheIt requires validation before use; it is not no-store.
max-ageThe response is fresh until the age expires.

Review boundary

  1. Record the response validator.
  2. Compare it with the conditional request value.
  3. Treat a match as 304 and a mismatch as a new representation.
  4. Separate storage, freshness and revalidation in the handoff.

This page does not contact a real server. Review live delivery settings with service logs and an approved procedure.

Six synthetic cases

caseresult
etag-match-304304 Not Modified
last-modified-304304 Not Modified
cache-control-no-cacheRevalidate
cache-control-max-ageFresh until stale
validator-mismatch200 OK / new representation
unsupported-network-requestReject