If-Modified-Since
Date-based cache revalidation avoids downloading unchanged resources. The HTTP If-Modified-Since request header makes a GET or HEAD request conditional, asking the server to return the resource only if modified after the specified date and time.
Usage
The If-Modified-Since header enables cache revalidation based on the modification date of a resource. The client includes the timestamp from the Last-Modified header received in a previous response. If the resource has not changed since the given date, the server returns a 304 Not Modified response with no body, saving bandwidth and processing time. If the resource has changed, the server sends a normal 200 response with the updated content.
The header applies only to GET and HEAD requests. For other methods, the companion If-Unmodified-Since header provides date-based conditional logic.
When both If-Modified-Since and If-None-Match appear in the same request, If-None-Match takes precedence. The ETag-based comparison is more reliable because timestamps have one-second resolution and clock skew between server and intermediate caches introduces edge cases.
The date value follows the HTTP-date format described in the Date header specification: day name, date, time in hours, minutes, and seconds, followed by GMT.
Example
A client revalidates a cached resource. The server returns 304 Not Modified if the resource has not changed since June 1, 2022 at 08:00 GMT. Otherwise, the server sends the full updated resource.
If-Modified-Since: Wed, 01 Jun 2022 08:00:00 GMT
A conditional request paired with Last-Modified in the previous response. The client stores the modification date and sends the modification date on the next request to the same resource.
Last-Modified: Wed, 01 Jun 2022 08:00:00 GMT
On the next request:
If-Modified-Since: Wed, 01 Jun 2022 08:00:00 GMT
Crawlers and If-Modified-Since
Googlebot sends If-Modified-Since when recrawling a URL previously served with Last-Modified, and answering 304 on unchanged content conserves crawl budget.
Google supports the mechanism while recommending
ETag and If-None-Match
instead, since dates carry more room for error.
Timestamps regenerated on every request defeat the
exchange entirely, because the resource appears
modified on each visit and the crawler receives a
full body every time. Setting the max-age field of
the Cache-Control response header
to the seconds the content stays unchanged
additionally helps crawlers decide when to recrawl
a URL.
Verified crawler probe
Probe data from verified crawler traffic (September 2026 snapshot) shows which bots send If-Modified-Since when requesting pages. Yes marks the header on at least nine of ten sampled requests from the bot, Sometimes marks a smaller share, and No marks absence.
| Crawler | Sends If-Modified-Since |
|---|---|
| Amazonbot | No |
| Applebot | No |
| Baiduspider | No |
| Bingbot | No |
| ClaudeBot | No |
| DuckDuckBot | No |
| GPTBot | No |
| Googlebot | No |
| Googlebot (smartphone) | Sometimes |
| Googlebot-Image | No |
| Meta-ExternalAgent | No |
| Meta-WebIndexer | No |
| OAI-SearchBot | No |
| SeznamBot | Sometimes |
| YandexBot | No |
| YandexFavicons | No |
See also
- RFC 9110: HTTP Semantics, Section 13.1.3
- RFC 9111: HTTP Caching
- Google: HTTP caching for crawlers
- Google Search Blog: Crawling December, HTTP caching
- If-None-Match
- If-Unmodified-Since
- Last-Modified
- ETag
- 304
- Conditional-Requests
- Caching
- HTTP headers