< C Family of Programming Languages | Knowledge Base | Cpu >
This article is primarily about HTTP cookies used on the World Wide Web not the MIT-MAGIC-COOKIE token used for X11 authentication.
A Cookie or "Magic Cookie" is a type of token used by the HTTP protocol to permit browsers such as Firefox to store small pieces of text on behalf of a server. A cookie consists of Name/Value pairs and may have attributes specifying an expiration time and other properties.
The originating server can set the value of one or more cookies and then read them again, which enables the server to identify the specific browser and perform a different action based on the contents of the cookies. (The HTTP protocol is "stateless", I.E. individual HTTP requests are necessarily not relatable to other requests except through this mechanism).
Cookies are sent to the browser by the server in the HTTP headers, which are control structures which allow the browser and the server to complete the requested action. Cookies are similar to hat-check tickets in this regard
After they are set, the browser sends these cookies to the server with each outgoing HTTP request, the server then detects these cookies and performs some particular action (which it would not otherwise perform) based on what values they contain. The server could also remove the cookies, change their contents or add new ones.
Cookies are commonly misunderstood to be menacing in nature, for more information on this please see Cookie Hysteria.
Cookies are named after a delicious asian-american desert called "fortune cookies" because similar to the real-world comestible, HTTP cookie contents are typically meaningless to the recipient.
You may be interested in the ways that vistua.com and associated sites set cookies on your browser.

< C Family of Programming Languages | K.B. Index | Cpu >
This is an article from the Knowledge Base, a project of the Vistua Online Helpdesk to form a body of articles relating to common system topics. You are welcome to contribute to it.