jargon

Comparison

ETagvsStale-while-revalidate

ETag

the client sends back the version tag it already has and you answer 304 with no body instead of resending the whole thing.

An opaque version identifier for a response, which clients echo back so the server can answer "unchanged" rather than resend. It saves bandwidth without giving up freshness, because the client still asks every time. The same tag doubles as an optimistic concurrency token on writes via `If-Match`, which is the cheapest way to reject a lost update over HTTP.

Full entry →

Stale-while-revalidate

you hand back the expired value immediately and refresh it in the background, so nobody actually waits for the recompute.

A policy that keeps serving an expired entry for a grace period while a single background request refreshes it. It converts a latency spike at expiry into slightly stale data, which for most read paths is the better trade. It also removes stampedes by construction, because only the refreshing request touches the origin.

Full entry →

Related comparisons