Skip to content
Commitwise
Menu

ETag

An identifier for one version of a response, used to ask the server cheaply whether a cached copy is still current.

Definition

The server sends ETag with a response; later the client sends it back in If-None-Match, and the server answers 304 Not Modified with no body if the version hasn't changed. Weak ETags (W/"...") mean semantically equal content. ETags must be the same on every server instance, and If-Match with an ETag gives optimistic concurrency on writes.

In practice

GET /api/products/42 with If-None-Match: "v7" gets 304 Not Modified while the product is still version 7.

Learn it in context

Lessons that use this term.

Related terms

Esc

Type to search the whole site.