Magic cookie

From Academic Kids

In computer programming, a magic cookie or cookie 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.

The token supplied at a coat check counter is an example of a magic cookie in real life. The token has no intrinsic meaning, but it's uniqueness allows it to be exchanged for the correct coat when returned to the coat check counter. The coat check token is opaque, how the counter staff is able to find the correct coat when then token is presented is immaterial to the person who wishes his coat returned.

Cookies are used as identifying tokens in many computer applications. When one visits a website, the remote server may leave a 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.

Video terminals

Some early video terminal units did not have the memory capacity to store video attributes (such as intensity or inverse display) for each on-screen character individually. Instead, a "magic cookie" character was inserted that displayed as a blank but instructed the video logic to change the attribute of subsequent text. As a consequence, each shift of display attributes would invariably insert one or more space characters, which had to be taken into consideration when designing a particular screen layout. Videotex, as used in teletext, is one of the few instances which have survived into the modern era.


This article was originally based on material from the Free On-line Dictionary of Computing, which is licensed under the GFDL.

da:Cookie de:Cookie fr:Cookie it:Cookie nl:Cookie pl:Cookie sv:Cookie sw:Kuki


Academic Kids Menu

  • Art and Cultures
    • Art (
    • Architecture (
    • Cultures (
    • Music (
    • Musical Instruments (
  • Biographies (
  • Clipart (
  • Geography (
    • Countries of the World (
    • Maps (
    • Flags (
    • Continents (
  • History (
    • Ancient Civilizations (
    • Industrial Revolution (
    • Middle Ages (
    • Prehistory (
    • Renaissance (
    • Timelines (
    • United States (
    • Wars (
    • World History (
  • Human Body (
  • Mathematics (
  • Reference (
  • Science (
    • Animals (
    • Aviation (
    • Dinosaurs (
    • Earth (
    • Inventions (
    • Physical Science (
    • Plants (
    • Scientists (
  • Social Studies (
    • Anthropology (
    • Economics (
    • Government (
    • Religion (
    • Holidays (
  • Space and Astronomy
    • Solar System (
    • Planets (
  • Sports (
  • Timelines (
  • Weather (
  • US States (


  • Home Page (
  • Contact Us (

  • Clip Art (
Personal tools