ClearCookies[domain]
clears all persistent and session cookies associated with the specified domain.
ClearCookies[assoc]
clears all cookies whose attributes match the specification in the association assoc.
ClearCookies[All]
clears all persistent and session cookies for all domains.
ClearCookies
ClearCookies[domain]
clears all persistent and session cookies associated with the specified domain.
ClearCookies[assoc]
clears all cookies whose attributes match the specification in the association assoc.
ClearCookies[All]
clears all persistent and session cookies for all domains.
Details
- In ClearCookies[domain], domain can be either a string or a string pattern of the type used in FileNames.
- ClearCookies[domain] is equivalent to ClearCookies[<|"Domain"->domain|>].
- In ClearCookies[assoc], the elements of the association are as specified in the notes for $Cookies.
- ClearCookies returns the list of cookies it has cleared.
- ClearCookies permanently clears even cookies that have been stored persistently at the location specified by $CookieStore.
Examples
open all close allBasic Examples (1)
Cookies are received and set when URL commands are executed:
URLRead[{"www.wolfram.com", "www.wolframcloud.com"}];There are cookies from more than one domain:
$CookiesClear cookies from the wolframcloud domain:
ClearCookies["*wolframcloud*"]$CookiesClear cookies matching specified attributes:
ClearCookies[<|"Name" -> "WR_SID", "Content" -> "*06*"|>]Properties & Relations (1)
ClearCookies returns a list of the cookies removed:
URLRead["www.wolfram.com"];clearedCookies = ClearCookies[All]$CookiesThose cookies can be later restored using SetCookies:
SetCookies[clearedCookies]$CookiesSee Also
Related Guides
History
Text
Wolfram Research (2016), ClearCookies, Wolfram Language function, https://reference.wolfram.com/language/ref/ClearCookies.html.
CMS
Wolfram Language. 2016. "ClearCookies." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ClearCookies.html.
APA
Wolfram Language. (2016). ClearCookies. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ClearCookies.html
BibTeX
@misc{reference.wolfram_2026_clearcookies, author="Wolfram Research", title="{ClearCookies}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/ClearCookies.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_clearcookies, organization={Wolfram Research}, title={ClearCookies}, year={2016}, url={https://reference.wolfram.com/language/ref/ClearCookies.html}, note=[Accessed: 12-June-2026]}