Accept-Datetime
The HTTP Accept-Datetime request header asks the server for a historical version of a resource captured at or near a specific date and time.
Usage
The Accept-Datetime header is part of the Memento protocol, a framework for accessing past versions of web resources. When a client sends this header with a date value, the server looks for an archived snapshot (called a Memento) closest to the requested date.
The Memento protocol defines several roles. An original resource (the live page) is hosted on a regular server. A TimeGate is an endpoint accepting datetime negotiation and redirecting to the best-matching Memento. A TimeMap lists all available Mementos for a given resource.
After processing the request, the server includes a Memento-Datetime response header indicating the exact capture date of the returned snapshot. The response status is typically 200 OK when served directly, or 302 Found when a TimeGate redirects to the archived copy.
The date format follows the standard HTTP date syntax. Precision depends on the archive: some services store daily snapshots, others capture pages multiple times per day.
Values
HTTP-date
An IMF-fixdate timestamp specifying the preferred
point in time. The format follows
Day, DD Mon YYYY HH:MM:SS GMT.
Example
A client requesting a snapshot of a resource from January 2015. The date follows the required IMF-fixdate format with a GMT timezone.
Accept-Datetime: Thu, 15 Jan 2015 00:00:00 GMT
A full request to a TimeGate, asking for the version of a page archived closest to July 2020.
GET /timegate/https://example.re/ HTTP/1.1
Host: web.archive.org
Accept-Datetime: Wed, 01 Jul 2020 12:00:00 GMT
The server responds with the closest available Memento and includes the actual capture date.
HTTP/1.1 302 Found
Location: /web/20200702/https://example.re/
Memento-Datetime: Thu, 02 Jul 2020 03:14:22 GMT
Vary: Accept-Datetime
Note
The returned snapshot does not always match the exact requested date. Web archives select the closest available capture based on retention policies and crawl frequency.
Takeaway
The Accept-Datetime request header enables datetime negotiation under the Memento protocol, letting clients retrieve archived versions of web resources from a specific point in time.
See also
- RFC 7089: HTTP Framework for Time-Based Access to Resource States -- Memento
- Memento-Datetime
- Content negotiation
- HTTP headers