If-Modified-Since Header Explained
What the HTTP If-Modified-Since header does and when it's used.
Published October 14, 2026
If-Modified-Since asks the server to send the resource only if it changed after the given date, otherwise reply 304.
How it works
It is the date-based sibling of If-None-Match.
The If-Modified-Since header is part of the HTTP message and is case-insensitive in name.
In a real exchange
curl -i https://example.com/
If-Modified-Since: Wed, 21 Oct 2026 07:28:00 GMT
Practical examples
The header
If-Modified-Since: Wed, 21 Oct 2026 07:28:00 GMTSet or use it in code
curl -H 'If-Modified-Since: Wed, 21 Oct 2026 07:28:00 GMT' -I https://example.com/data.jsonInspect it
curl -sI https://example.com | grep -i 'if-modified-since'Common mistakes
- Clock skew between servers
- One-second resolution missing quick changes
- Not sending Last-Modified first
Key takeaways
- If-Modified-Since: If-Modified-Since asks the server to send the resource only if it changed after the given date, otherwise reply 304.
- Check it in browser DevTools → Network.
- Test with curl -I before deploying.
FAQ
ETag or date?
ETags are more precise; dates are simpler.
Is If-Modified-Since case sensitive?
Header names are case-insensitive; values may not be.