If-None-Match Header Explained
What the HTTP If-None-Match header does and when it's used.
Published October 14, 2026
If-None-Match is a conditional request header carrying one or more ETags; the server returns 304 Not Modified if the current ETag matches.
How it works
It saves bandwidth on cache revalidation.
The If-None-Match header is part of the HTTP message and is case-insensitive in name.
In a real exchange
curl -i https://example.com/
If-None-Match: "33a64df551425fcc"
Practical examples
The header
If-None-Match: "33a64df551425fcc"Set or use it in code
curl -H 'If-None-Match: "33a64df551425fcc"' -I https://example.com/app.cssInspect it
curl -sI https://example.com | grep -i 'if-none-match'Common mistakes
- Not sending ETag in the first response
- Ignoring weak comparison rules
- Returning 200 with a full body when it matches
Key takeaways
- If-None-Match: If-None-Match is a conditional request header carrying one or more ETags; the server returns 304 Not Modified if the current ETag matches.
- Check it in browser DevTools → Network.
- Test with curl -I before deploying.
FAQ
304 or 200?
304 when the ETag matches, 200 with a body otherwise.
Is If-None-Match case sensitive?
Header names are case-insensitive; values may not be.