ETag

A fingerprint of a response that lets browsers check if their cached copy is still valid.

An ETag is an opaque validator the server attaches (strong or weak). On later requests the client sends If-None-Match; if content unchanged, the server returns 304 Not Modified and the browser reuses the cached body. This saves bandwidth compared to unconditional 200 responses on every navigation.

Why developers care

API gateways and CDNs sometimes strip ETags when compressing or transforming bodies, which forces full refetch. Dynamic apps that disable caching entirely miss free wins for semi-static JSON. Configuring ETags correctly pairs with Cache-Control freshness so users see updates when data changes without redownloading when it does not.

Example

ETag: "33a64df551425fcc55e4d42a148795d9f25f89d4" # Client conditional request: If-None-Match: "33a64df551425fcc55e4d42a148795d9f25f89d4" # If unchanged: HTTP/1.1 304 Not Modified

Spec

RFC 7232

Audit caching with EdgeFix →