If-Modified-Since
The "If-Modified-Since" header field in a request asks the server to only perform the requested operation of the state of the resource has changed since the client's last update. The equivelant header for ETags is If-None-Match; if available, use that instead.
Writing requests (clients)
Use If-Modified-Since
when freshining a cache.
The If-None-Match header is more precise; if available, use that instead.
Reading requests (servers)
If the client also specified If-None-Match, ignore this header.
If the request method is not a valid HTTP-date, ignore this header.
If the request method is not GET or HEAD, ignore this header.
If the resource's Last-Modified date is the same or older than this header, return 304 (Not Modified).
Overview table
- Name
- If-Modified-Since
- Description
- Makes the request conditional on the resource being updated after the provided date.
- Direction
- Request
- Specification
- RFC 9110: HTTP Semantics §13.3.1. If-Modified-Since
Syntax
If-Modified-Since = HTTP-date
History
- 1999-06: RFC 2616 §14.24. If-Modified-Since
- 2014-06: RFC 7232 §3.3. If-Modified-Since. Conditional requests is split into a separate document during the update.
- 2022-06: RFC 9110 §13.3.1. If-Modified-Since. Conditional requests was moved back into core HTTP semantics.