Forum Discussion

LiefZimmerman's avatar
Jun 01, 2023

TIL - Why do they call it a Cookie?

In a conversation with my 17yo a couple days ago about TikTok unique views I proposed that it would be easy(er) to count unique views because they don't have to rely on cookies the way a website might.

17 - A cookie?
Me - Yeah - a cookie is a little identifier that a website might store on your device to know that you've been here before."
Why is it called a cookie?
Because it's...because, um...I don't have any real idea! But I'm going to guess it's from a fairy tale or something.
     <grabs The Google>

Ohhh, interesting. (I'll mark this as a spoiler in case you wanna think about why for just a second.)

The term cookie was coined by web-browser programmer Lou Montulli. It was derived from the term magic cookie, which is a packet of data a program receives and sends back unchanged, used by Unix programmers. The term magic cookie itself derives from the fortune cookie, a wafer with a paper message inside.

src:  HTTP cookie - Wikipedia

The moral of this story is pay attention to your junior devs. Sometimes they ask a question that makes you track back and either learn something you took for granted, never asked, or didn't TRULY know.

4 Replies