Cookies API
cookie.remove()
Removes the cookie associated with the current document.
-
Accepts the cookie name as a string as the first argument.
Accepts an optional second argument as an object with the following options:OptionTypepathstringdomainstringsecurebooleansame'strict' or 'lax'
Example:
cookie.remove('book');
// Removes the cookie 'book', '__Secure-book', and '__Host-book'.
cookie.remove('book', {
path: '/',
domain: 'book.com',
secure: true,
same: 'strict'
});
// Removes the cookie 'book' based on the provided options.