← Back to Network domain

Network.deleteCookies

Deletes browser cookies with matching name and url or domain/path/partitionKey pair.

Domain: Network stable

Parameters

NameTypeDescription
namestringName of the cookies to remove.
url (optional)stringIf specified, deletes all the cookies with the given name where domain and path match provided URL.
domain (optional)stringIf specified, deletes only cookies with the exact domain.
path (optional)stringIf specified, deletes only cookies with the exact path.
partitionKey (optional)CookiePartitionKeyIf specified, deletes only cookies with the the given name and partitionKey where all partition key attributes match the cookie partition key attribute.

Example Request

{
  "id": 1,
  "method": "Network.deleteCookies",
  "params": {
    "name": "example-name"
  }
}

Example Response

{
  "id": 1,
  "result": {}
}

Usage in Node.js

const result = await send('Network.deleteCookies', {"name": "example-name"});
console.log(result);