ETag
Also called: Entity tag
A version label the server sends with a response so clients can ask 'has this changed?' and get 304 if not.
Definition
The client sends the ETag back in an If-None-Match header. If the resource hasn't changed, the server answers 304 Not Modified with an empty body and the client uses its cached copy. With If-Match on an update, a stale ETag gets 412 Precondition Failed, which prevents lost updates. Testers check that the ETag changes when the data changes.
In practice
A restaurant's menu returns ETag "r3-v3". Sending If-None-Match: "r3-v3" returns 304 until the menu is edited.
Learn it in context
Lessons that use this term.