caching

Last-Modified

Timestamp of when the origin server believes the resource was last modified, used as a weak validator for conditional requests. Clients echo it back in If-Modified-Since to receive a 304 when unchanged.

Last-Modified: <day-name>, <day> <month> <year> <hour>:<minute>:<second> GMT  (IMF-fixdate, RFC 9110)

Common directives / values

Directive Purpose
IMF-fixdate Preferred format: 'Tue, 15 Nov 1994 12:45:26 GMT' — always GMT, always this shape.
rfc850-date Legacy accepted format: 'Tuesday, 15-Nov-94 12:45:26 GMT'.
asctime-date Legacy accepted format: 'Tue Nov 15 12:45:26 1994'.

Examples

Last-Modified: Wed, 21 Oct 2025 07:28:00 GMT

Standard IMF-fixdate; browser echoes this back as If-Modified-Since on refresh.

Last-Modified: Wed, 21 Oct 2025 07:28:00 GMT\nETag: "abc123"

Send both — ETag takes precedence but Last-Modified is a fallback for older caches.

HTTP/1.1 304 Not Modified\nLast-Modified: Wed, 21 Oct 2025 07:28:00 GMT

Returned when If-Modified-Since matches; body is omitted.

Last-Modified: Thu, 01 Jan 1970 00:00:00 GMT

Epoch trick to force revalidation on caches that only compare timestamps.

Gotcha

Only 1-second resolution — resources modified twice in the same second may serve stale. The date MUST be GMT and formatted exactly per RFC 9110; localized month/day names are non-conforming.

Related headers

← All HTTP headers · HTTP status codes · Fix CORS errors