-
Notifications
You must be signed in to change notification settings - Fork 15
Home
YorickC edited this page Jan 6, 2015
·
15 revisions
Make your website Memento compliant in a few easy steps.
The Memento protocol enables date time negotiation for web resources. With it, a user can see what a resource was in a certain point in the past.
- Suppose you have a web resource identified by some URI. We call the resource the Original Resource and refer to its URI as URI-R.
- Suppose you have a snapshot of what this URI-R looked like in the past. We call such a snapshot a Memento and we refer to its URI as URI-M. There could be many snapshots of URI-R, taken at different moments in time, each with their distinct URI-Mi.
Example
With this setup, there are two steps to make such web resources Memento compliant.
- Run the TimeGate server with your custom handler. The handler is the piece of code that is specific to the resources. It needs to implement either of the following:
- Given a URI-R, return the list of dated URI-Ms.
- Given a URI-R and a date time, return one single dated URI-M.
- Add HTTP headers required by the Memento protocol to responses from the Original Resource and its Mementos:
- For the Original Resource, add a "Link" header that points at its TimeGate
- For each Memento, add a "Link" header that points at the TimeGate
- For each Memento, add a "Link" header that points to the Original Resource
- For each Memento, add a Memento-Datetime header that conveys the snapshot datetime
Using the previous example, and supposing a TimeGate server is running at http://example.com/timegate/
, Memento HTTP response headers for the Original Resource and one Memento look as follows.
And that's it! With the TimeGate, date time negotiation is now possible for this resource.
Start by reading the guide for comprehensive information about the TimeGate server.
See the LICENSE file.