tough-cookie.cookiejar.removeallcookiessync.md
May 3, 2024 ยท View on GitHub
Home > tough-cookie > CookieJar > removeAllCookiesSync
CookieJar.removeAllCookiesSync() method
Removes all cookies from the CookieJar.
Note: Only works if the configured Store is also synchronous.
Signature:
removeAllCookiesSync(): void;
Returns:
void
Remarks
-
This is a new backwards-compatible feature of tough-cookie version 2.5, so not all Stores will implement it efficiently. For Stores that do not implement
removeAllCookies, the fallback is to callremoveCookieaftergetAllCookies. -
If
getAllCookiesfails or isn't implemented in the Store, an error is returned. -
If one or more of the
removeCookiecalls fail, only the first error is returned.