Skip to content

deleteCookies()

Deletes browser cookies with matching name and URL or domain/path pair. If cookie name is not given or empty, all browser cookies are deleted.

await deleteCookies() # clears all browser cookies
await deleteCookies("CSRFToken", {url: "http://the-internet.herokuapp.com"})
await deleteCookies("CSRFToken", {domain: "herokuapp.com"})
Name Type Description
cookieName string Cookie name. Default: undefined.
options Object Default: {}.
options.url string deletes all the cookies with the given name where domain and path match provided URL. eg: https://google.com Default: undefined.
options.domain string deletes only cookies with the exact domain. eg: google.com Default: undefined.
options.path string deletes only cookies with the exact path. eg: Google/Chrome/Default/Cookies/.. Default: undefined.
Type Description
Promise<void>