Clears the browser's cache.
Note that although this function can take a browsingData.RemovalOptions object, it will be ignored. The entire cache is always cleared when using this function.
This is an asynchronous function that returns a Promise.
Clears the browser's cache.
Note that although this function can take a browsingData.RemovalOptions object, it will be ignored. The entire cache is always cleared when using this function.
This is an asynchronous function that returns a Promise.
let removing = browser.browsingData.removeCache(
removalOptions // RemovalOptions object
)
removalOptions Optional
object. A browsingData.RemovalOptions object. This parameter has no effect.
A Promise that will be fulfilled with no arguments when the removal has finished. If any error occurs, the promise will be rejected with an error message.
Clear the browser cache:
function onRemoved() {
console.log("removed");
}
function onError(error) {
console.error(error);
}
browser.browsingData.removeCache({}).then(onRemoved, onError);
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
removeCache |
Yes | 79 |
53removalOptions.since is not supported.
|
? | Yes | No | ? | ? |
85removalOptions.since is not supported.
57–79removalOptions.since is not supported.
|
? | No | ? |
Note: This API is based on Chromium's chrome.browsingData API.
© 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/browsingData/removeCache