sets cookies with attributes specified by the association assoc, to be used by functions such as URLExecute.
sets a list of cookies.
- In SetCookies[assoc], the following entries can appear in the association, with the same possible values as in $Cookies:
- "ExpirationDate"->Automatic indicates that a cookie is for this session only, and is not persistent.
- SetCookies can set both session cookies and persistent cookies.
- All cookies that have been set are reflected in the list $Cookies. Information on persistent cookies is stored in the location specified by $CookieStore.
Examplesopen allclose all
Basic Examples (1)
The cookies are stored in $Cookies for later use:
URLRead and related functions process cookie requests from the server:
If there is a matching cookie in $Cookies, no request is made by the server:
ClearCookies removes cookies:
Those cookies can be later restored using SetCookies:
Wolfram Research (2016), SetCookies, Wolfram Language function, https://reference.wolfram.com/language/ref/SetCookies.html.
Wolfram Language. 2016. "SetCookies." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SetCookies.html.
Wolfram Language. (2016). SetCookies. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SetCookies.html