cookies.remove()

Deletes a cookie by name.

Syntax

browser.cookies.remove(
  details,                // object
  function(details) {...} // optional function
)

Parameters

details
object. Information to identify the cookie to remove.
url
string. The URL associated with the cookie. If host permissions for this URL are not specified in the manifest file, the API call will fail.
name
string. The name of the cookie to remove.
storeIdOptional
string. The ID of the cookie store to look in for the cookie. If unspecified, the cookie is looked for by default in the current execution context's cookie store.
callbackOptional
function. The function is passed the following arguments:
detailsOptional
object. Contains details about the cookie that's been removed. If removal failed for any reason, this will be "null", and runtime.lastError will be set.

Additional objects

details

Contains details about the cookie that's been removed. If removal failed for any reason, this will be "null", and runtime.lastError will be set.

url
string. The URL associated with the cookie that's been removed.
name
string. The name of the cookie that's been removed.
storeId
string. The ID of the cookie store from which the cookie was removed.

Browser compatibility

EdgeFirefoxChromeOpera
Basic support?45.0Yes33
Firefox
Basic support48.0

Examples

Acknowledgements

This API is based on Chromium's chrome.cookies API. This documentation is derived from cookies.json in the Chromium code.

Document Tags and Contributors

 Contributors to this page: wbamberg
 Last updated by: wbamberg,