Entity tag
An ETag identifies a particular representation version of an HTTP resource and supports conditional reads or changes.
An entity tag is an HTTP validator in the ETag response header. It identifies a particular version of the representation served. The value need not be a content hash and should be treated by the client as an opaque identifier, not a sortable version number.
Two conditional requests
A fictional project overview responds with ETag: "r7". On a later GET with If-None-Match: "r7", the server can return 304 without resending the body if the representation is unchanged. If it changed, the new representation is transferred with its new validator.
For a change, the same identifier has another role: an edit using If-Match: "r7" encounters the now-current representation "r8". The unmet precondition produces 412 instead of overwriting the newer state with the old edit. The application must handle this conflict visibly. Checking and changing must work together correctly on the server; sending a header alone provides no protection.
If-Match uses strong comparison. A weak validator with the W/ prefix does not satisfy this comparison. Cache reads and write checks therefore use different conditions. An ETag does not replace an authorisation check and does not decide who may see or change the data.
Sources
Related terms
- Browser cacheThe browser cache stores suitable HTTP responses for later use. Reuse and revalidation follow the applicable rules.
- Server-sent eventsServer-sent events carry text notifications from server to client over HTTP, for example about the progress of a background job.
- Cross-Origin Resource SharingCORS controls browser access to responses across origin boundaries. It replaces neither API login nor permission checks.
- Electronic Data InterchangeEDI transfers structured business documents between systems. Format, partner profile, data mapping and responses need to agree.
- Real-time processingReal-time processing handles arriving events against a defined latency target. Event time, processing time and late data need explicit rules.
- Batch processingBatch processing handles a defined set of data or jobs together in one run.
Articles on this topic

Your project with ASES
Describe your project to us. We will get back to you with an initial assessment.
