browsingData.RemovalOptions
The browsingData.RemovalOptions type contains options to control certain aspects of browsing data removal.
Type
Values of this type are objects. They contain the following properties:
-
string. This property only applies to cookies and indexedDB items. The removal is limited to items belonging to a specific cookie store as specified by the ID. See Work with contextual identities for more information.Note: On Firefox Nightly removal of localStorage items by
cookieStoreIdis also supported. excludeOriginOptional-
arrayofstring. List of origins to exclude from the removal process. Can't be used together withorigins. Only supported for cookies, storage, and cache. Cookies are excluded for the entire registrable domain. hostnamesOptional-
arrayofstring. This property applies to cookie, indexedDB, local storage, and service worker registration items. Remove only cookie, indexedDB, local storage, and service worker registration items associated with these hostnames.You must pass in just a hostname here, without protocol (for example,
"google.com"not"https://google.com"). You can use theURLinterface to parse a raw URL and retrieve the hostname. Items associated with subdomains of a given hostname are not removed: you must explicitly list subdomains. originOptional-
arrayofstring. List of origins to remove data for. Can't be used together withexcludeOrigins. Only supported for cookies, storage, and cache. Cookies are cleared for the entire registrable domain. originTypesOptional-
object. Used to control whether to remove data only from normal web pages, or also from hosted web apps and extensions. If this option is omitted, only data from normal web pages (unprotectedWeb) is removed. Before removing data from web apps or extensions, be very careful to ensure that this is really what the user wants.This object may contain any of the following properties:
unprotectedWebOptional-
boolean. If present andtrue, remove data from normal web pages. protectedWebOptional-
boolean. If present andtrue, remove data from websites that have been installed as hosted apps. extensionOptional-
boolean. If present andtrue, remove data from extensions.
sinceOptional-
number. How far back in time to remove data, given in milliseconds since the UNIX epoch. Note that when removing the browser cache, the entire cache is always removed and this option is ignored. If thesinceproperty is omitted, it defaults to 0, which means "forever".
Browser compatibility
Loading…
Note:
This API is based on Chromium's chrome.browsingData API.