Explore Cookies
When you visit some sites, the server may send information to your computer in the form of "cookies", pieces of text with different purposes.
Visiting some sites sets cookies to the variable $Cookies.
Use URLRead to visit the Wolfram and Wolfram|Alpha sites.
In[1]:=
response1 = URLRead["wolfram.com"]
Out[1]=
In[2]:=
response2 = URLRead["wolframalpha.com"]
Out[2]=
Each response contains a list of cookies, each one given as an association of several fields.
In[3]:=
response1["Cookies"]
Out[3]=
In[4]:=
response2["Cookies"]
Out[4]=
All cookies are stored in $Cookies.
In[5]:=
$Cookies
Out[5]=
Find the cookies associated to a given domain.
In[6]:=
FindCookies["wolfram.com"]
Out[6]=
In a given session, subsequent requests to the server do not include any cookies in the responses.
In[7]:=
response3 = URLRead["wolframalpha.com"]
Out[7]=
In[8]:=
response3["Cookies"]
Out[8]=