Home » Blog » Why are internet cookies called cookies?
Why are internet cookies called cookies

Why are internet cookies called cookies?

I am sure you have heard of cookies 🍪 no matter how many hours you’ve spent learning programming, or even if you are just a casual user unrelated to the tech world. You’ll see this term used all over the Internet. It’s usually the first thing that pops up when you visit a site for the first time. The site requests that you agree to cookies and explains how it uses them.

A good percentage of internet users often portray cookies as harmful. Mostly because people feel that someone is tracking their behavior while visiting a site — and yes, to some extent, this is true. But have you ever stopped to wonder: why are internet cookies called cookies? Why not use some other kind of delicacy? Like tarts or donuts? 🤭

Why are internet cookies called cookies? The Cookie Montster
The Cookie Monster – Sesame Street

The Legacy of Montulli’s Internet Cookies

To fully answer why are internet cookies called cookies, we need to start with Lou Montulli, one of Netscape’s founding engineers.

In 1994, Montulli introduced browser cookies as a technical solution to a frustrating problem: websites had no memory. Each time you loaded a new page, the website had no idea who you were or what you’d done moments earlier — it couldn’t remember if you had logged in, or what items you’d placed in your shopping cart. This limitation made building useful, user-friendly web experiences nearly impossible.

Why are internet cookies called cookies? Lou Montulli holding a jar of cookies
Lou Montulli

Montulli’s solution was simple. He stored small pieces of data in your browser. These allowed websites to “remember” things between visits and page loads. This idea — storing small amounts of information to improve the user’s experience — became a turning point in the history of the web.

But why are internet cookies called cookies and not something else? Montulli himself has explained that while he was brainstorming, he recalled a term from his college days in computer science: “magic cookies.”

As mentioned in Montulli’s blog post

I had heard the term “magic cookie” from an operating systems course from college. The term has a somewhat similar meaning to the way Web Cookies worked and I liked the term “cookies” for aesthetic reasons. Cookies was the first thing I came up with and the name stuck.   

Lou Montulli

Many say Montulli also drew inspiration from fortune cookies 🥠 — little treats containing small hidden messages. Similarly, browser cookies contain small packets of information about the user. However, Montulli clarified that the fortune cookie analogy was secondary; the real naming influence came from established computing terminology.

Magic cookies, LSD, and Unix users

The term “magic cookie” existed long before internet cookies, and understanding this connection helps clarify why are internet cookies called cookies today.

In programming, systems often pass a magic cookie — a small piece of data — between each other as a kind of identifier or token. The recipient doesn’t care what’s inside the cookie. Programmers took this idea from early computing.

The term magic cookie appears in the Unix Programmer’s Manual. It helps explain how functions like ftell() and fseek() track file positions using seemingly random numbers. To many programmers, these cookies felt like magic because they just worked.

ftell returns the current value of the offset… 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.   

Unix documentation

Montulli liked the term “cookies” partly because of this existing technical jargon and partly because of its playful, light-hearted sound.

For added flavor, some point to the 1970s hacker culture, Unix communities, and counterculture comics like Odd Bodkins by Dan O’Neil. In these circles, magic cookies were tokens with mysterious, sometimes surreal, properties — much like the arbitrary bits of data passed between systems.

So, when asking why are internet cookies called cookies, the answer is clear. It comes from a blend of technical tradition, playful naming, and Montulli’s own preferences.

The Cookie Monster Connection 🍪

It’s hard to discuss cookies without mentioning Cookie Monster from Sesame Street. He devours cookies mindlessly. Browsers behave in a similar way, silently gobbling up cookies in the background. This connection is mostly playful. Still, it helped reinforce the idea of “cookies” being small, harmless, and consumed without much thought. That light-hearted image made the term easier for people to accept at the time.

Why Are Internet Cookies Called Cookies? — A Quick Recap

  • Lou Montulli introduced browser cookies in 1994 to give websites “memory.”
  • He drew on the existing programming term “magic cookies” as inspiration.
  • The term “cookies” was already familiar in tech, playful, and non-threatening.
  • Fortune cookies served as a fitting metaphor but weren’t the primary reason.
  • Why are internet cookies called cookies? Because it combines tech history with simplicity and charm.

While researching for this post, I stumbled upon an insightful Youtube video discussing hidden heroes like Montulli created by Netguru. I recommend giving it a watch as it delves deeper into Montulli’s journey in pioneering the first-ever cookies.

If you’re into history-related programming trivia, you might also enjoy this post about the origin of the word “bug” in programming. It’s another quirky and surprising piece of tech history that shows how language shapes the tech world we live in today.

Leave a reply

Your email address will not be published. Required fields are marked *