The Last-Modified header is an HTTP response header that communicates the exact date and time a server believes a resource was last updated. It serves as a validator to help browsers and search engines determine if they need to download a fresh copy of a page or file. For SEOs and marketers, this header is a critical tool for managing crawl budget and ensuring users see the most recent version of your content.
What is Last-Modified?
The Last-Modified header is metadata sent by an origin server to a client (like a browser or a search engine bot). It provides a timestamp that indicates when the content—whether an HTML page, a PDF, or an image—was last changed.
This feature has been [widely available and functional across all major browsers since July 2015] (MDN). While it is primarily an HTTP technical communication, many Content Management Systems (CMS) also use this data to display "Published on" or "Updated on" dates for readers.
Why Last-Modified matters
Using this header correctly improves site performance and helps search engines index your site more effectively.
- Optimizes crawl budget: Search engine [crawlers use the header to adjust how frequently they visit a page] (MDN) based on how often it actually changes.
- Reduces server load: If the content hasn't changed, the server can tell the browser to use its local version instead of sending the whole file again.
- Improves Quality Assurance: Content managers use this timestamp to [decide if documents or media files are outdated and need to be refreshed or deleted] (Siteimprove).
- Enables heuristic caching: If you don't provide specific caching instructions, browsers use this header to guess how long they should store a resource.
How Last-Modified works
When a browser requests a page it has seen before, it uses "conditional requests." It sends the date it currently has stored, and the server compares that to the current file.
- The Initial Request: Your browser requests
page.html. - The Server Response: The server sends the file along with the header:
Last-Modified: Wed, 21 Oct 2015 07:28:00 GMT. - The Feedback Loop: The next time the browser needs that page, it sends a request with an
If-Modified-Sinceheader containing that same date. - The Validation: If the file hasn't changed, the server sends a "304 Not Modified" status. The browser then loads the local copy, saving bandwidth.
Best practices
- Use GMT exclusively: All HTTP dates must be expressed in Greenwich Mean Time, never in local time zones.
- Ensure metadata is intact: For PDFs and media files, ensure your server or CMS can extract the modification date from the file's internal metadata.
- Combine with ETags: Use
Last-Modifiedas a fallback for ETags. While ETags are more accurate for identifying specific file changes,Last-Modifiedis the standard baseline for time-based validation. - Watch for "Computed" values: In tools like Airtable, [last modified tracking for different fields was introduced at different stages, such as May 2019 and June 2020] (Airtable). Ensure your internal tools are actually capturing the data you expect.
Common mistakes
Mistake: Using local time zones instead of GMT.
Fix: Configure your server to output the standard HTTP date format (e.g., Wed, 21 Oct 2015 07:28:00 GMT).
Mistake: Thinking the header updates when you change "computed" data like a formula or a calculated field. Fix: Understand that most systems only trigger a "modified" status when a user directly edits a field, not when a background calculation updates.
Mistake: Relying on it for high-precision changes.
Fix: Use ETags if you need to differentiate between changes that happen within the same second, as Last-Modified is only accurate to the second.
Last-Modified vs ETag
| Feature | Last-Modified | ETag |
|---|---|---|
| Logic | Based on time and date. | Based on a unique content "fingerprint." |
| Accuracy | Less accurate (1-second resolution). | More accurate (detects even tiny changes). |
| Complexity | Simple for servers to generate. | Requires more processing to hash files. |
| Primary Use | General caching and crawl frequency. | Strict version control and data integrity. |
FAQ
Does every file have a Last-Modified date? Not necessarily. The header is generally not available for external or excluded documents that your server does not directly manage. If a file is newly created and has never been edited, it may return a blank value until the first modification occurs.
How do search engine crawlers use this?
Crawlers look at this header to determine if a page has changed since the last time they indexed it. If the Last-Modified date is the same as the previous crawl, the bot may skip the page to save its crawl budget for newer or more frequently updated content.
What happens if the header is missing? If the header is missing, browsers may use "heuristic caching," where they try to guess how long to keep the file. This can lead to users seeing outdated content because the browser doesn't have a reliable way to check for updates.
Can a modification date be blank in database tools? Yes. In platforms like Airtable, any [records created before the feature was launched in May 2019 will return blank values] (Airtable) until a new modification is made.