Using ETag

Learn how to use ETag.

An ETag, abbreviated from entity tag, is a header part of the HTTP standard. It allows a client to make conditional requests using its cache, limiting bandwidth and usage of server resources.

When a client sends a request to a server, the latter can reply with a response including an ETag header. Common methods of ETag generation include using a collision-resistant hash function of the resource’s content, a hash of the last modification timestamp, or even just a revision number.

The below terminal demonstrates a server reply with an ETag header. Run the terminal provided below to see the etag header in http response from http://httpbin.org/etag.

Get hands-on with 1200+ tech skills courses.