Persistent Cookies
By default, cookies do not persist across sessions. Cookies that have a definite expiration date can be stored in a file determined by $CookieStore. Setting it to Automatic will let the system choose that file.
Initially, $CookieStore is set to None.
In[1]:=
$CookieStore
Out[1]=
Change it to Automatic.
In[2]:=
$CookieStore = Automatic
Out[2]=
This is the file that will contain persistent cookies.
In[3]:=
$CookieStore
Out[3]=
Cookies are stored in unprocessed form. Each line in the following list corresponds to a cookie. Each line will contain either TRUE or FALSE, or both.
In[4]:=
FindList[$CookieStore, {"TRUE", "FALSE"}]
Out[4]=
Visit a website.
In[5]:=
URLRead["amazon.com"]
Out[5]=
Now the cookie store file contains more cookies.
In[6]:=
FindList[$CookieStore, {"TRUE", "FALSE"}]
Out[6]=