What is the Last-Modified header?
Last-Modified gives the date a resource last changed. Caches send it back in If-Modified-Since to revalidate, and use it for heuristic freshness.
Last-Modified is an HTTP response header that gives the date and time the origin believes the resource last changed. A cache revalidates a stored copy by sending that date back in If-Modified-Since. If nothing changed since then, the origin answers 304 Not Modified without a body, and the cache keeps serving its copy.
Last-Modified: Sat, 17 Oct 2026 09:12:00 GMT
If-Modified-Since: Sat, 17 Oct 2026 09:12:00 GMTIts resolution is one second, so two changes within a second look identical. An `ETag` is the more precise validator, and when a request carries both If-None-Match and If-Modified-Since, RFC 9110 has the server evaluate If-None-Match and ignore the date.
- Without `max-age` or `Expires`, RFC 9111 allows caches to guess a freshness lifetime from it. A common heuristic is a fraction of the time since the last change.
- For a page that is rebuilt on every deploy, set explicit freshness instead of relying on that heuristic.
- The same date can feed a sitemap's
lastmod, which helps crawlers prioritize changed URLs, as described under XML sitemap.
Related terms
References
- RFC 9110: HTTP Semanticshttps://www.rfc-editor.org/rfc/rfc9110
- RFC 9111: HTTP Cachinghttps://www.rfc-editor.org/rfc/rfc9111
Warm your cache after every deploy
sitewarm requests the pages in your sitemap after a deploy and reports the cache state the CDN returns for each one, with the vantage point it was measured from.