What's In a Name? Cookies!
I'm teaching a lesson on persistence in the browser using Local Storage, Session Storage, and Cookies this week. Of course, I found it interesting that two of the mechanisms are called "Storage" while the other is named, "Cookies."
I've used cookies for years, and I always assumed they were named that for a reason along the lines of the "Hansel and Gretal" theory: Cookies were crumbs of information left behind so you could follow your state -- like the fairy tale characters dropped crumbs along their trail to find their way home. Of course, the children's plan was disastrously flawed since woodland creatures consumed the crumbs and they wandered, lost until they were lured to their deaths by the witch living in the gingerbread house. (Note: I know some versions of the story have them surviving the ordeal, but I'm pretty sure in the original version they were the witch's dinner.)
It's a reasonable explanation, and many people would be satisfied with that as I was for years, but I decided to dig further to see if there were any more authoritative answers on the subject.
That's when I came across this wonderful post as BonkersAboutTech titled "Why are Cookies called Cookies?" The author gives you some great technical info about how and why cookies work the way they do, and he offers a paragraph linking to a couple of theories on where the name came from.
Andrew Stuart at DominoPower offers an explanation as to Where Cookies Come From that I find the most compelling primarily because he emailed the guy who invented browser cookies and asked him! Genius! His terse answer is, "Cookies are named after the computer science term 'magic cookie.'" Magic cookies were small packets of data passed around a computer system -- which is part of what a browser cookie does, so that makes sense.
Of course, that begs the question, where does the term "magic cookie" come from?
Bonkers About Tech also links to an explanation that dates back to the early days of Xerox when they had a system that stored information about the user in a small file they called a cookie. The story goes that the developers named it in honor of a character on the Andy Williams show called "Cookie Bear." Plausible, yes. What's more, it's wonderfully bizarre end to my journey.
I've used cookies for years, and I always assumed they were named that for a reason along the lines of the "Hansel and Gretal" theory: Cookies were crumbs of information left behind so you could follow your state -- like the fairy tale characters dropped crumbs along their trail to find their way home. Of course, the children's plan was disastrously flawed since woodland creatures consumed the crumbs and they wandered, lost until they were lured to their deaths by the witch living in the gingerbread house. (Note: I know some versions of the story have them surviving the ordeal, but I'm pretty sure in the original version they were the witch's dinner.)
It's a reasonable explanation, and many people would be satisfied with that as I was for years, but I decided to dig further to see if there were any more authoritative answers on the subject.
That's when I came across this wonderful post as BonkersAboutTech titled "Why are Cookies called Cookies?" The author gives you some great technical info about how and why cookies work the way they do, and he offers a paragraph linking to a couple of theories on where the name came from.
Andrew Stuart at DominoPower offers an explanation as to Where Cookies Come From that I find the most compelling primarily because he emailed the guy who invented browser cookies and asked him! Genius! His terse answer is, "Cookies are named after the computer science term 'magic cookie.'" Magic cookies were small packets of data passed around a computer system -- which is part of what a browser cookie does, so that makes sense.
Of course, that begs the question, where does the term "magic cookie" come from?
Bonkers About Tech also links to an explanation that dates back to the early days of Xerox when they had a system that stored information about the user in a small file they called a cookie. The story goes that the developers named it in honor of a character on the Andy Williams show called "Cookie Bear." Plausible, yes. What's more, it's wonderfully bizarre end to my journey.
Comments
Post a Comment