If-Unmodified-Since
Request header Conditional

Overview

If-Unmodified-Since is a conditional request header that lets the request proceed only if the resource has not changed since the given time. It is used for time-based concurrent-edit protection and is the opposite of If-Modified-Since.

Details

The client stores the `Last-Modified` value received when reading a resource and sends it via If-Unmodified-Since on a modify or delete request. The server checks whether the resource is unchanged since that time: if so it processes the request; if someone changed it meanwhile it rejects with 412 Precondition Failed, preventing lost updates.

It serves the same purpose as ETag-based If-Match but uses a one-second-resolution date. It therefore can't detect changes within the same second, so If-Match is safer for precise concurrency control. Think of it as the fallback for servers that can't provide an ETag.

It also aids resumable downloads. It is conceptually adjacent to `If-Range` (date/ETag) carried on Range requests, following a similar flow that ensures a resume only when the resource is unchanged.

Syntax

If-Unmodified-Since: <http-date>

e.g. If-Unmodified-Since: Wed, 21 Oct 2015 07:28:00 GMT

Notes

Related headers

Related status codes

Specification