HTTP ETag

This mechanism allows caches to be more efficient and saves bandwidth, as a Web server does not need to send a full response if the content has not changed.

An ETag is an opaque identifier assigned by a Web server to a specific version of a resource found at a URL.

However, an ETag-generation function could be judged to be "usable", if it can be proven (mathematically) that duplication of ETags would be "acceptably rare", even if it could or would occur.

A weakly validating ETag match only indicates that the two representations are semantically equivalent, meaning that for practical purposes they are interchangeable and that cached copies can be used.

If it is determined that the URL has expired (is stale), the client will send a request to the server that includes its previously saved copy of the ETag in the "If-None-Match" field.

If the ETag values match, meaning that the resource has not changed, the server may send back a very short response with a HTTP 304 Not Modified status.

In this case, the client may decide to replace its previously cached version with the newly returned representation of the resource and the new ETag.

In July 2011, Ashkan Soltani and a team of researchers at UC Berkeley reported that a number of websites, including Hulu, were using ETags for tracking purposes.