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 7232: HTTP/1.1 Conditional Requests §3.3. If-Modified-Since
Syntax
If-Modified-Since = HTTP-date
History
- 1999-06: RFC 2616 §14.25. If-Modified-Since
- 2014-06: Revised and split apart in RFC 7232: Conditional Requests §3.3. If-Modified-Since
- 2014-06: Moved back into HTTP Semantics as part of the new cluster, in RFC 9110: HTTP Semantics