Deletes all visits from the browser's history.
This function triggers history.onVisitRemoved
just once, with allHistory
set to true
and an empty urls
argument.
This is an asynchronous function that returns a Promise
.
Deletes all visits from the browser's history.
This function triggers history.onVisitRemoved
just once, with allHistory
set to true
and an empty urls
argument.
This is an asynchronous function that returns a Promise
.
let deletingAll = browser.history.deleteAll()
None.
A Promise
will be fulfilled with no parameters when all history has been deleted.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
deleteAll |
Yes | 79 | 49 | ? | Yes | No | ? | ? | No | ? | No | ? |
Delete all history when the user clicks a browser action:
function onDeleteAll() {
console.log("Deleted all history");
}
function deleteAllHistory() {
let deletingAll = browser.history.deleteAll();
deletingAll.then(onDeleteAll);
}
deleteAllHistory();
Note: This API is based on Chromium's chrome.history
API. This documentation is derived from history.json
in the Chromium code.
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/history/deleteAll