ETag
An opaque fingerprint of a response's content that lets a client ask a server whether it's changed without re-downloading it.
ETag is a response header carrying an opaque identifier — typically a hash of the response body — that a server can use to answer one question cheaply: has this resource changed since the client last saw it? The client stores the ETag it received, and on the next request sends it back in an If-None-Match header. If the server's current ETag matches, it replies 304 Not Modified with no body at all; if it doesn't, the server sends the full response along with the new ETag.
This is a stronger freshness signal than a last-modified timestamp, which is the older mechanism (Last-Modified / If-Modified-Since) it commonly complements. A timestamp only has the resolution of a second and says nothing if content changes and changes back within that window; a content hash notices exactly the bytes that matter and nothing else — a resource regenerated with identical content gets the same ETag and a 304, where a timestamp-based check would have to guess whether "modified at this second" actually meant "different."
ETags come in two flavors that matter for one specific case: a strong ETag asserts byte-for-byte identity, while a weak ETag (prefixed W/) asserts only that the content is semantically equivalent — useful for something like HTML regenerated with different whitespace but the same meaning. A cache that treats a weak ETag as strong can serve a response that's technically different from what a byte-exact comparison would allow, which matters for range requests but rarely for whole-response caching.
ETags are the revalidation half of HTTP Caching: max-age handles how long a response stays fresh with zero requests at all; the ETag handles what happens once that freshness window expires and the client has to ask.
See also3
HTTP Caching
The set of headers that let a browser or intermediary reuse a previous response instead of re-fetching it.
Web Platform18 connections
Cache Invalidation
Deciding when a cached value has stopped being correct — famously one of the hard problems.
Web Platform30 connections
Preload and Prefetch
Two resource hints with opposite priorities — preload for what this page needs now, prefetch for what the next page might need.
Web Platform12 connections
Related2
Nearby in the graph rather than deliberately chosen. Looser, sometimes surprising.
Linked from3
- HTTP CachingWeb Platform
The set of headers that let a browser or intermediary reuse a previous response instead of re-fetching it.
- HTTP Status CodeWeb Platform
The three-digit number at the start of every HTTP response that tells the client, caches, crawlers and monitoring what happened, grouped into five classes by the first digit.
- Service WorkerWeb Platform
A background script the browser runs between a page and the network, able to intercept requests even when no page is open.