Skip to main content
The Clear Browsing Data command (Command Type: 15) removes specified types of browsing data (cookies, cache, localStorage, etc.) from the browser with granular control over what is cleared.

Command Type

Command Type ID: 15

Parameters

ParameterTypeDescriptionRequired
dataTypesBrowsingData.DataTypeSetThe types of data to clearYes
removalOptionsBrowsingData.RemovalOptionsOptions controlling what exactly is removedYes
timeoutnumberTimeout in millisecondsYes

DataTypeSet Fields (all optional booleans)

FieldDescription
cacheThe browser’s cache
cookiesBrowser cookies
downloadsDownload list
formDataStored form data
historyBrowsing history
indexedDBWebsites’ IndexedDB data
localStorageWebsites’ local storage
passwordsStored passwords
serviceWorkersService Workers

RemovalOptions Fields

FieldTypeDescription
cookieStoreIdstringOnly remove data for this cookie store
hostnamesArray of stringOnly remove data for these hostnames
sincenumber or stringRemove data accumulated on or after this date (epoch ms)

Usage Examples

Clear Cookies and Cache

{
  "command": "clear-browsing-data",
  "params": {
    "dataTypes": { "cookies": true, "cache": true },
    "removalOptions": {},
    "timeout": 10000
  }
}

Clear Only Cookies for a Specific Domain

{
  "command": "clear-browsing-data",
  "params": {
    "dataTypes": { "cookies": true },
    "removalOptions": { "hostnames": ["example.com"] },
    "timeout": 10000
  }
}