If-None-Match
Request header that makes the request conditional: the server returns 200 with the body only if none of the listed ETags match the current representation, otherwise 304 Not Modified. In write requests it protects against creating a duplicate resource.
If-None-Match: "<etag>"[, "<etag>"...] | If-None-Match: * Common directives / values
| Directive | Purpose |
|---|---|
| "<etag>" | Match against a specific strong or weak ETag. |
| * | Matches any existing representation — used on PUT/POST to prevent overwriting. |
| comma-separated list | Client may present multiple ETags it holds cached copies for. |
Examples
GET /style.css HTTP/1.1\nIf-None-Match: "33a64df551" Revalidation request — server returns 304 if ETag still matches, 200 + body otherwise.
If-None-Match: "v1", "v2", W/"v3" Client has multiple cached versions; any match yields 304.
PUT /users/42 HTTP/1.1\nIf-None-Match: * Create-only semantics: fail with 412 Precondition Failed if resource already exists.
If-None-Match: "abc"\nIf-Modified-Since: Wed, 21 Oct 2025 07:28:00 GMT Both sent — per RFC 9110 the server MUST evaluate If-None-Match and ignore If-Modified-Since.
Gotcha
When both If-None-Match and If-Modified-Since are present, servers must evaluate ETag and ignore the date — sending both is fine and provides fallback for HTTP/1.0 intermediaries.