Release status: stable
|Implementation||Data extraction, User interface|
|Description||Allows MediaWiki to support the Memento protocol (RFC 7089), allowing one to see past versions of wiki pages using the same protocol as web archives and other version control systems.|
|Latest version||2.2.0 (2019-05-24)|
|Compatibility policy||Snapshots releases along with MediaWiki. Master is not backward compatible.|
|License||GNU General Public License 2.0 or later|
See the Configuration section
|Quarterly downloads||2 (Ranked 169th)|
The Memento extension allows one to browse an entire MediaWiki site as if it were a date in the past; to do this it adds support for datetime negotiation as specified by the Memento protocol to a MediaWiki system. It provides server-side support to allow a Memento client to navigate a MediaWiki system as it was at a time in the past chosen by a user. To gain an understanding about the functionality provided by Memento's time travel, check out this brief overview that includes temporal navigations across Wikipedia and other web sites.
The Memento "Time Travel for the Web" effort started in 2009 with the overall goal of making it as easy to navigate the past of the web as it is to navigate the current web. The basic idea underlying the Memento protocol is that an old version of a web page, such as a version of a Wikipedia article - http://en.wikipedia.org/w/index.php?title=Web_archiving&oldid=526371727 - can be retrieved by accessing its original URI - http://en.wikipedia.org/wiki/Web_archiving - and by applying datetime negotiation to it. Datetime negotiation is similar to content negotiation, which is used frequently by browsers, for example, to ask a server for a version of a page in a specific format e.g. HTML or PDF. Datetime negotiation asks the server for a version with a specific date, and uses the special purpose Accept-Datetime HTTP header to do so.
The Memento protocol is meanwhile natively supported by several web archives. Also, all versions of DBpedia are natively accessible via the Memento protocol, and proxy support for all language version of Wikipedia has been implemented.
Memento's time travel is not yet natively supported in browsers and hence requires installing an extension. A Memento extension for Chrome, fully compliant with the most recent protocol specification, was released the end of September 2013. A screencam illustrates the extraordinary time travel functionality it provides.
For more information about using the extension once installed, visit Help:Extension:Memento.
This extension allows access to versions of MediaWiki pages by implementing support for the
Accept-Datetime HTTP request header to perform datetime negotiation, a variation on content negotiation specified in RFC 2295 . The datetime for negotiation is expressed as a value of the
Accept-Datetime HTTP header. The Memento extension for Chrome or the command line mcurl can be used to set this datetime value.
Datetime negotiation works in two simple steps:
- When a client requests a page, this extension will provide the URI of a TimeGate for the page in the HTTP Link header. The TimeGate is capable of datetime negotiation to access versions of the page.
- When a client navigates to the TimeGate and performs datetime negotiation with it, the TimeGate provides the client with the version of the page that was operational at the datetime used for negotiation. The creation datetime of that version is provided in the
Memento-DatetimeHTTP response header, along with links in the HTTP Link header including a link to the current version of the page and to a TimeMap for the page.
This extension also allows access to a TimeMap for a MediaWiki page, which is a document that enumerates all versions of the page as well as a TimeGate for the page. When a client requests a page, this extension will provide the URI of a TimeMap for the page in the HTTP Link header.
This MediaWiki extension uses the same handlers as the MediaWiki software to connect to the database. Hence all the existing database permissions and page access permissions are honored. It uses a
'DB_SLAVE' database connection, which means that the database connection can only read from the tables. Therefore, this plug-in makes no changes to the data in the wiki.
- Download and place the file(s) in a directory called
- Add the following code at the bottom of your
wfLoadExtension( 'Memento' );
- Configure as required.
- Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
This extension has sensible defaults, but also allows the following settings to be added to LocalSettings.php in order to alter its behavior:
$wgMementoTimemapNumberOfMementos- (default is 500) allows the user to alter the number of Mementos included in a TimeMap served up by this extension.
$wgMementoIncludeNamespaces- is an array of Mediawiki Namespace IDs (e.g. the integer values for Talk, Template, etc.) to include for Mementofication, default is an array containing just 0 (Main); the list of Mediawiki Namespace IDs is at Manual:Namespace
$wgMementoTimeNegotiationForThumbnails- EXPERIMENTAL: MediaWiki, by default, does not preserve temporal coherence for its oldid pages. In other words, an oldid (URI-M) page will not contain the version of the image that existed when that page was created. See http://arxiv.org/pdf/1402.0928.pdf for more information on this problem in web archives. This setting has two values:
- false - (default) do not attempt to match the old version of the image to the requested oldid page
- true - attempt to match the old version of the image to the requested oldid page
In addition to the default MediaWiki installation, this plugin will also work in a setup with URL rewriting. This plugin will also work with wikis in a proxy setup.
TimeGates, TimeMaps and their workings
This extension introduces two new resources to your MediaWiki installation:
- TimeGate: A resource associated with a page that supports datetime negotiation to access versions of the page. In the default installation of this extension, the TimeGate URL coincides with the page URL.
- TimeMap: A TimeMap for a page is a resource from which a list of URIs of versions of the page is available. The URI list is serialized in application/link-format. The TimeMap is paged: for articles with many revisions, the TimeMap will only return the number of Mementos specified by the configuration parameter
$wgMementoTimemapNumberOfMementos. TimeMap URLs to retrieve additional mementos are provided in the TimeMap with the
relattribute "timemap". Please refer to Memento RFC Pattern 6 for more details. Like the TimeGate, the URL to the TimeMap is also available in the Link header and the URL format is: http://your.wikiserver.here/index.php/Special:TimeMap/Title
The best way to experience this extension is by installing Memento Time Travel for the Chrome browser. After installing Memento Time Travel, enter the URL of a page in your wiki and set the desired date-time. Memento Time Travel will use the TimeGate installed in the wiki to load the version of the article that was live at the requested date-time.
After setting the date-time in Memento Time Travel, a user can click both the internal and external links in the page and navigate the web in the past.
This extension can also be used and tested in two other ways:
- Using a Firefox browser: Install the Modify Headers Firefox extension. Then set the
Accept-Datetimeheader from the Tools/Modify Headers menu option. The syntax to use is
Accept-Datetime: Sat, 03 Oct 2009 10:00:00 GMT. Set it to a date-time at which your wiki was already generating history pages. Then enter a URL of a page from your wiki that has associated history pages around the date-time you chose. Using the Live HTTP Headers Firefox Extension, the request and response headers involved in this transaction can be seen. The URL to the TimeGate can be obtained from the
<Link>header, using this extension. This URL can be used to navigate to the TimeGate.
- Using the UNIX command line tool
curl -o null.html -D headers.txt -H "Accept-Datetime: Sat, 03 Oct 2009 10:00:00 GMT" http://your.wikiserver.here/your-title-here
For complete information about the memento framework and it's request - response headers, please refer to the IETF Memento Internet Draft.
Special pages under the URL http://your.wikiserver.here/index.php/Special:SpecialPages do not have a history, i.e. there are no revisions to these pages. Hence, the Memento extension cannot perform time negotiations on these resources.
This plugin does not make any deleted revisions accessible.
This extension searches for and retrieves the mementos using the modified time of an article. Timestamps are not unique identifiers and it is possible that an article will have more than one revision at any given time. This extension handles this situation by redirecting to the revision that has the highest revision id.
MediaWiki does not resolve deleted revisions using revision ids, but use timestamps instead in their URIs. Hence, we could not come up with a way to resolve a situation when more than one deleted revision has the same timestamp.
Wikis with Memento extension installed
- strategy:Proposal:Digital Archaeology
- phab:T36778 "Deploy extension Memento on Wikipedia sites" (2012/2013, regarding an earlier version, cf. 2016 update)
- RfC on English Wikipedia (2012)