The If-None-Match request header makes an HTTP request conditional based on entity tags (ETag).
Conditional GET revalidation
When requesting resources previously stored in client or proxy caches, the client transmits the cached ETag in If-None-Match:
GET /v1/products/481 HTTP/1.1
Host: api.example.test
If-None-Match: "v2-948fbc"
Possible server outcomes
- Resource unchanged: The server evaluates the condition as false and responds with:
No response body is sent, saving network bandwidth and latency.HTTP/1.1 304 Not Modified Date: Fri, 11 Sep 2026 10:00:00 GMT ETag: "v2-948fbc" Cache-Control: private, no-cache - Resource updated: The server evaluates the condition as true and responds with HTTP 200 OK containing the updated representation and a new
ETag.
Safe state updates with If-None-Match: *
When creating new resources with PUT, clients can send If-None-Match: *. The server will only process the creation if the resource does not already exist, preventing accidental overwrite of existing data (otherwise returning HTTP 412 Precondition Failed).
How to test with curl
Simulate conditional GET revalidation using curl:
curl -i https://api.example.test/v1/products/481 \
-H 'If-None-Match: "v2-948fbc"'
Key takeaway
The If-None-Match header enables conditional cache revalidation by comparing client-held ETags against current server state, returning 304 Not Modified when content has not changed.