HTTP - Last-Modified Header

About

The Last-Modified header provides the last modified date and time of a resource.

It is a (weak) validator part of a conditional get request in order to see if a resource has changed since the last fetch.

If the resource is a composed resource, the Last-Modified time would usually be the most recent time of any of those resources.

Example

Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT

Syntax

syntax

Last-Modified: HTTP-date

where HTTP-date is RFC2822 date (with the example being in the GMT zone)

Weak Validator

Note that because this is a time value, the value is then based on computer clock and can therefore differ if the response is created by two different server (in case of a high availability cluster with a gateway).

During comparison, a last-modified time may be equal if the difference is in a arbitrary 60-second limit guards.

Because of this flaw, the last-modified value is considered to be a weak validator. To validate that the resource has changed more thoroughly, the etag should also be used.

Documentation / Reference


Powered by ComboStrap