Glossary
ETag
HTTP entity tag for cache validation
An ETag (Entity Tag) is an HTTP response header — typically a hash or version stamp of the response body — that lets a client revalidate a cached resource without downloading it again.
Workflow:
- First request: server returns the resource with
ETag: "abc123". - Client caches the response with the ETag.
- Next request: client sends
If-None-Match: "abc123". - Server compares the current ETag to the client’s. If equal:
304 Not Modifiedwith an empty body, client uses its cached copy. If different:200 OKwith the new body and new ETag.
Two ETag flavours:
- Strong ETags — change if the bytes change. Default.
- Weak ETags — prefixed
W/, may match across “semantically equivalent” responses (e.g., compressed vs uncompressed of the same content).
ETag is one of three HTTP cache-validation mechanisms (alongside Last-Modified + If-Modified-Since, and Cache-Control max-age). For modern static sites with content-hashed asset URLs, ETag is rarely necessary — but it remains the workhorse for dynamic APIs that want client-side caching.
Published May 15, 2026