ETag
Noun · Development
Definitions
An HTTP response header containing a unique identifier (hash or version) for a specific version of a resource. Clients can send If-None-Match with the ETag on subsequent requests — if the resource hasn't changed, the server returns 304 Not Modified (no body), saving bandwidth. More precise than Last-Modified timestamps.
In plain English: A fingerprint for a web resource that lets browsers check if it changed, avoiding downloading the same data again.
Example: "The API returns ETag: "abc123" — the next request sends If-None-Match: "abc123" and gets a 304 if nothing changed, saving a full response body."
Etymology
- 1997
- HTTP/1.1 (RFC 2068) introduced the ETag (entity tag) header as a mechanism for web cache validation, allowing servers to identify specific versions of a resource.
- 1999
- RFC 2616 refined the ETag specification, distinguishing strong and weak validators. ETags became essential for conditional requests using If-None-Match headers.
- 2000s
- Web frameworks and CDNs adopted ETag generation automatically. Apache and Nginx used inode, size, and modification time to compute ETags by default.
- 2014
- RFC 7232 updated the specification as part of the HTTP/1.1 revision. ETags remained the preferred mechanism for fine-grained cache validation alongside Last-Modified.
Origin Story
The Tiny Tag That Saves the Internet Billions of Bytes
ETag, short for 'entity tag,' is an HTTP header that acts like a fingerprint for a web resource. When a server sends a response, it can attach an ETag value, a short string that uniquely identifies that particular version of the content. The next time a client requests the same resource, it sends the ETag back in an 'If-None-Match' header. If the content has not changed, the server replies with a lean 304 Not Modified status instead of retransmitting the entire payload. The concept was introduced in HTTP/1.1, defined in RFC 2068 (1997) by Roy Fielding, Jim Gettys, and their co-authors. Fielding, who was also formalizing the REST architectural style in his doctoral work at UC Irvine, saw conditional requests as essential to building a scalable web. ETags gave servers a flexible mechanism that could be based on content hashes, version numbers, or any opaque string. Over the decades, ETags became a cornerstone of web performance, used by CDNs, API gateways, and browsers alike to avoid redundant data transfer. They remain one of the simplest yet most effective tools for keeping the web fast and bandwidth-efficient.
Coined by: Roy Fielding and the HTTP/1.1 working group
Context: Defined in the HTTP/1.1 specification (RFC 2068, 1997) as a conditional caching mechanism.
Fun fact: ETags were once controversially used for user tracking. Because each user could receive a unique ETag, advertisers exploited them as 'supercookies' that persisted even after users cleared their browser cookies.