DELAPARRA
Index
Color
NL
Category: HTTP headers

ETag

Explained by Updated

What is ETag?

ETag: An opaque token identifying the resource version. Used with If-None-Match for conditional GETs. An ETag is a version identifier the server sends with a response, such as ETag: "a1b2c3". When the resource changes, the ETag changes too. On the next request, the browser sends the value back in If-None-Match. If the resource has not changed, the server replies 304 Not Modified with no body, and the browser uses its cached copy. That saves bandwidth while still checking for updates.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about ETag

What should you keep in mind with ETag?

ETags are also useful for safe updates in APIs. A client sends If-Match with the ETag it last saw. If someone else changed the resource in the meantime, the server refuses with 412 Precondition Failed instead of silently overwriting their work. Make sure ETags are consistent across servers behind a load balancer, or caching will break.

What does an example of ETag look like?

ETag: "abc123"

At a glance

CategoryHTTP headers
Explained by
Updated

More HTTP headers terms

All terms starting with E

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.