If-Unmodified-Since
The "If-Unmodified-Since" header field makes a request conditional on the resource having a Last-Modified date earlier than or equal the specified date. It is typically used for unsafe requests, such as PUT, to prevent a "lost update".
The equivelant header for ETag is If-Match; if available, use that instead.
Writing requests (clients)
Use this header when making changes to a resource, that has only a Last-Modified date (and no known ETag). This header is less precise than If-Match; if available, use that instead.
Reading requests (intermediaries)
Caches and other intermediate nodes can typically ignore this header, as it is not used in caching.
Reading requests (origin servers)
Conditional headers are evaluated after a representation is selected, and just before it is written to the response.
If the client also specified the If-Match header, ignore this header and follow that one instead.
If the request method is not a valid HTTP-date, ignore this header.
If the header value is a date earlier or equal to the Last-Modified
date of the selected representation, then return 412 (Precondition Failed). 304 (Not Modified)
is not applicable because this header is not used in caching.
If the request is missing a precondition header and the server requires one to protect against lost updates, see 428 (Precondition Required).
Overview table
- Name
- If-Unmodified-Since
- Description
- Makes the request conditional on the resource being unchanged since the provided date.
- Direction
- Request
- Specification
- RFC 7231: HTTP/1.1 Conditional Requests ยง3.4. If-Unmodified-Since
Syntax
If-Unmodified-Since = "100-continue"