Skip to content

ETag

A unique identifier for a specific version of a resource to enable highly efficient cache validation.

The ETag (Entity Tag) response header provides an identifier for a specific version of a resource, usually represented as a hash of the content or a version number. It acts as a fingerprint. When a client makes subsequent requests for the same resource, it sends the ETag back to the server. If the fingerprint matches, the server knows the content hasn’t changed.

Include an ETag string on responses for static assets, heavy JSON payloads, or resources that are frequently polled but rarely updated.

It prevents the server from returning a massive payload that the client already has. Instead, the server compares the ETag, realizes nothing changed, and instantly returns a lightweight 304 Not Modified status, saving bandwidth and processing time.

Generate a hash of your payload string and send it surrounded by quotes. ETag: "33a64df551425fcc55e4d42a148795d9f25f89d4"

ETag: "686897696a7c876b7e"