direct the browser to write cookies.
Each web page can have 1 cookie, which can be about 4096 bytes of data.
A browser will store about 300 cookies total,
no more than 20 cookies allowed
per web site. These values can vary slightly, depending
on the browser.
When a cookie is written that exceeds the limits, the least recently used cookie
is deleted to make room
The simplest cookie takes the form of
A cookie has four optional attributes
path identifies path to documents which may access the cookie
domain server(s) which may access the cookie
expires date cookie will be deleted
secure limits cookie to transmission only over a secure channel (HTTPS)
A complete cookie looks like
Notice there are no quotes or space or punctuation marks
the cookie string.
a cookie lasts only during the current browser session. When the
browser session is over the cookie is destroyed unless the expires attribute
is set to a future date (expiration date).
Only when the current browser session is over is the cookie written to a file.
To get the entire cookie content use
To set the cookie use
Building or editing the cookie string is the tricky part