To all our readers in the U.S., Please don't scroll past this. This Tuesday, for the 1st time recently, we humbly ask you to defend Wikipedia's independence. 98% of our readers don't give; they simply look the other way. If you are an exceptional reader who has already donated, we sincerely thank you. If you donate just $2.75, or whatever you can this Tuesday, Wikipedia could keep thriving for years. Most people donate because Wikipedia is useful. If Wikipedia has given you $2.75 worth of knowledge this year, take a minute to donate. Show the volunteers who bring you reliable, neutral information that their work matters.
How often would you like to donate?
Select an amount (USD)
The average donation is $16.36.
Please select a payment method
Please select an amount (minimum $1)
We cannot accept donations greater than 12000 USD through our website. Please contact our major gifts staff at benefactors@wikimedia.org.
Please select a payment method
Can we follow up and let you know if we need your help again? The support and advice we get from donors in the U.S. is priceless, but many donors don't let us stay in touch. Will you commit today, this Tuesday, to staying in touch with Wikipedia?
Sorry to hear that. We don't email often; would you consider changing your mind?
Thanks for changing your mind! We'll respect your inbox.
Your information is handled in accordance with our donor privacy policy, and each email you receive will include easy unsubscribe options.
Please select an email option

Why not make it monthly?

Monthly support is the best way to ensure that Wikipedia keeps thriving.

Thank you for your support!

Please select an amount (minimum $1)
We cannot accept donations greater than 12000 USD through our website. Please contact our major gifts staff at benefactors@wikimedia.org.

Magic cookie

From Wikipedia, the free encyclopedia

In computing, a magic cookie, or just cookie for short, is a token or short packet of data passed between communicating programs, where the data is typically not meaningful to the recipient program. The contents are opaque and not usually interpreted until the recipient passes the cookie data back to the sender or perhaps another program at a later time. The cookie is often used like a ticket – to identify a particular event or transaction.[1]

In some cases, recipient programs are able to meaningfully compare two cookies for equality.

Early use[]

The term magic cookie appears in the man page for the fseek routine in the C standard library, dating back at least to 1979, where it was stated:

  • "ftell returns the current value of the offset relative to the beginning of the file associated with the named stream. It is measured in bytes on UNIX; on some other systems it is a magic cookie, and the only foolproof way to obtain an offset for fseek."[2][3]

Cookie as token[]

An analogy is the token supplied at a coat check (cloakroom) counter in real life. The token has no intrinsic meaning, but its uniqueness allows it to be exchanged for the correct coat when returned to the coat check counter. The coat check token is opaque because the way in which the counter staff are able to find the correct coat when the token is presented is immaterial to the person who wishes their coat returned. In other cases (as is possible with HTTP cookies), the actual data of interest can be stored as name–value pairs directly on the cookie.

Cookies are used as identifying tokens in many computer applications. When one visits a website, the remote server may leave an HTTP cookie on one's computer, where they are often used to authenticate identity upon returning to the website.

Cookies are a component of the most common authentication method used by the X Window System.

References[]

  1. ^ Raymond, Eric. "Cookie". The Jargon File. Retrieved 2014-02-03.
  2. ^ UNIX Programmer's Manual, 7th Edition, Vol. 1, FSEEK (3S), Bell Telephone Laboratories, Murray Hill, New Jersey, January 1979.
  3. ^ UNIX Programmer's Manual, Vol. II (Library), FSEEK (3S), 4.2 BSD, 12 Feb 1983.

This article is based on material taken from the Free On-line Dictionary of Computing prior to 1 November 2008 and incorporated under the "relicensing" terms of the GFDL, version 1.3 or later.

Retrieved from ""