Use the history API to interact with the browser history.

Note that downloads are treated as HistoryItem's. Therefore, events such as history.onVisited will also fire for downloads.

Browser history is a chronological record of pages the user has visited. The history API enables you to:

However, the user may have visited a single page multiple times, so the API also has the concept of "visits". So you can also use this API to:

To use this API, an add-on must request the "history" permission in its manifest.json file.


Describes how the browser navigated to a particular page.

Provides information about a particular page in the browser history.


Describes a single visit to a page.


Searches the browser history for history.HistoryItem objects matching the given criteria.
Retrieves information about visits to a given page.
Adds a record to the browser history of a visit to the given page.
Removes all visits to the given URL from the browser history.
Removes all visits to pages that the user made during the given time range.
Removes all visits from the browser history.


Fired each time the user visits a page, providing the history.HistoryItem data for that page.

Fired when a URL is removed completely from the browser history.

Browser compatibility

Chrome Edge Firefox Firefox for Android Opera
HistoryItem Yes No 49.0 * No 33
TransitionType Yes No 50.0 No 33
VisitItem Yes No 50.0 No 33
addUrl Yes * No 49.0 No 33 *
deleteAll Yes No 49.0 No 33
deleteRange Yes No 49.0 No 33
deleteUrl Yes No 49.0 No 33
getVisits Yes No 50.0 No 33
onVisitRemoved Yes No 50.0 No 33
onVisited Yes No 50.0 No 33
search Yes No 49.0 No 33

Chrome incompatibilities


Example add-ons


This API is based on Chromium's chrome.history API. This documentation is derived from history.json in the Chromium code.

Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.

Document Tags and Contributors

 Contributors to this page: mwein, wbamberg, Sheppy
 Last updated by: mwein,