docs.rodeo

MDN Web Docs mirror

browsingData

{{AddonSidebar}} 

Enables extensions to clear the data that is accumulated while the user is browsing.

In the browsingData API, browsing data is divided into types:

You can use the {{WebExtAPIRef("browsingData.remove()")}}  function to remove any combination of these types. There are also dedicated functions to remove each particular type of data, such as {{WebExtAPIRef("browsingData.removePasswords()", "removePasswords()")}} , {{WebExtAPIRef("browsingData.removeHistory()", "removeHistory()")}}  and so on.

All the browsingData.remove[X]() functions take a {{WebExtAPIRef("browsingData.RemovalOptions")}}  object, which you can use to control two further aspects of data removal:

Finally, this API gives you a {{WebExtAPIRef("browsingData.settings()")}}  function that gives you the current value of the settings for the browser’s built-in “Clear History” feature.

To use this API you must have the “browsingData” API permission.

Types

Methods

Browser compatibility

{{Compat}} 

{{WebExtExamples("h2")}} 

[!NOTE] This API is based on Chromium’s chrome.browsingData API.

In this article

View on MDN