A cookie is operationally a relatively small named string stored by the browser and a property of the Document object
|
The cookie mechanism gives the browser a kind of memory, that is, a cookie "saves state"
|
Originally, only CGI scripts could read/write cookie strings, but with JavaScript, cookies can be handled entirely on the client side
|
A cookie
-
persists for the duration of the browser session (but an expiration date may be given)
-
is associated with the subtree of the document that created it (but a cookie path may be specified)
-
is accessible to pages on the server that created it (but a cookie domain may be declared)
|