devkult_
tools29converters34
home/headers/last-modified

Last-Modified

response headercaching

The date and time the server believes the resource last changed.

Last-Modified gives a timestamp for the resource. Caches revalidate by sending it back in If-Modified-Since. When there's no Cache-Control, browsers also use it to guess how long a response stays fresh — commonly 10% of the time since it last changed.

Syntax

Last-Modified: <day-name>, <day> <month> <year> <hh>:<mm>:<ss> GMT

Defined in RFC 9110 §8.8.2 — Last-Modified.

Examples

Last-Modified: Wed, 14 Oct 2026 09:30:00 GMT

an HTTP date, always in GMT

Good to know

  • Its one-second precision can miss rapid changes — prefer ETag for resources that update often.
  • Set Cache-Control explicitly, so heuristic caching doesn't keep old content around.
  • The format is fixed; in JavaScript, new Date().toUTCString() produces it.

Further reading: HTTP caching explained

Who sets Last-Modified

Static file servers set Last-Modified from the file's modification time — nginx, Apache and express.static all do it by default. Check it with curl -sI https://example.com/app.css | grep -i last-modified.

Check it

Fetch only the response headers and filter for Last-Modified. In the browser, it's under Response Headers in DevTools → Network.

curl -sI https://example.com/ | grep -i '^last-modified:'

To compare response headers across many URLs at once, use the HTTP Status Checker.

Frequently asked questions

ETag or Last-Modified?

Send both where you can. ETag is precise and works for generated content; Last-Modified is cheap for static files. When a client sends both conditions, If-None-Match wins.

Status codes it appears with
Related headers