The name comes from a programmer's joke about a computer science concept
The term "cookie" for web data started as a playful reference to a concept in computer science called a "magic cookie" — a packet of data that a program sends out and expects to get back unchanged. In the early 1990s, when web browsers needed a way to remember information about you between page visits, programmers borrowed that term. The name stuck, even though most people using the web today have no idea why a small text file is called a cookie at all.
The actual origin traces to Netscape Communications, the company behind the Netscape Navigator browser. In 1994, engineer Lou Montulli created the first cookie system to solve a real problem: e-commerce sites needed to remember what was in your shopping cart when you left and came back. Instead of inventing a new term, the team chose "cookie" because it was already familiar to programmers who worked with magic cookies in Unix systems. The name was informal, slightly humorous, and it worked.
Key Takeaways
- Cookies are small text files that websites store on your computer to remember information about you across visits.
- The name comes from a computer science term "magic cookie," not from the food — it was chosen as an inside joke by early web programmers.
- Cookies serve legitimate purposes like keeping you logged in and remembering your preferences, but they also track your browsing across websites.
- Your browser stores cookies in a specific folder, and you can view, delete, or block them through your browser settings.
What a cookie actually does on your computer
When you visit a website, the server can ask your browser to store a small piece of text — usually between 4 kilobytes and a few hundred bytes. Your browser saves this text in a dedicated folder on your hard drive. The next time you visit that same website, your browser automatically sends that text back to the server before the page even loads.
This happens invisibly. You do not see it, and most websites do not announce it. The server uses the information in the cookie to recognize you: it might know your username, your language preference, items in your shopping cart, or the fact that you logged in yesterday. Without cookies, you would have to log in to every website fresh each time you visit, and shopping carts would empty the moment you closed the browser.
Cookies are not programs. They cannot run code, install software, or access files on your computer beyond the cookie storage folder itself. They are just text — like a note that a website leaves on your desk so it remembers you the next time you walk in.
First-party cookies versus third-party tracking cookies
A first-party cookie comes from the website you are actually visiting. If you go to amazon.com, Amazon sets a cookie. If you go to nytimes.com, the New York Times sets a cookie. These are generally the ones that do useful work: keeping you logged in, remembering your settings, storing your cart.
A third-party cookie comes from a different company entirely. When you visit a news site, an advertising network might also set a cookie on your computer — not because you asked for it, but because the news site has an ad from that network on the page. That ad company can then track you across dozens of websites that all use the same ad network. This is how you see an ad for shoes on one site, then see the same shoe ad following you around the internet for weeks.
Most browsers now block third-party cookies by default. Chrome, Firefox, Safari, and Edge all restrict them in their standard settings. This happened because advertisers and data brokers were using third-party cookies to build detailed profiles of your browsing habits without your knowledge, and regulators pushed back.
How to see and delete cookies in your browser
You can view the cookies stored on your computer right now. In Chrome, go to Settings, then Privacy and Security, then Cookies and Other Site Data. You will see a list of every website that has stored a cookie on your device. Click on any site name and you can see the individual cookies it set — their names, values, and expiration dates.
In Firefox, the path is Preferences, then Privacy and Security, then Cookies and Site Data. Safari uses Preferences, then Privacy, then Manage Website Data. Edge mirrors Chrome's layout since it uses the same underlying engine.
You can delete cookies in bulk — clearing all cookies from all sites — or delete them selectively by site. Most browsers also let you set cookies to delete automatically when you close the browser, though this breaks the "remember me" features on sites you use regularly. You can also block all cookies, but this will break login systems and shopping carts on many websites.
Why the name matters less than what cookies actually do
The history of the name is trivia. What matters is understanding what cookies do: they let websites remember you, which is sometimes useful and sometimes invasive. A cookie from your bank that keeps you logged in is different from a cookie from an ad network that tracks you across 500 websites.
The term "cookie" obscures what is actually happening. If browsers called them "tracking files" or "website memory files," people would have a clearer sense of what they are. The cute name made them seem harmless, which is partly why third-party tracking cookies became so widespread before anyone pushed back.
Understanding that cookies are just text files that websites store and retrieve helps you make better decisions about your privacy. You can see them, delete them, and control which sites can set them. The name is just history.
How cookies differ from other tracking methods
Cookies are not the only way websites track you. Local storage and session storage are similar technologies that work the same way but store larger amounts of data and are harder to delete. Pixels and beacons are tiny invisible images embedded in websites and emails that report back to a server when you view them, logging your activity without storing anything on your device.
Fingerprinting is a newer technique where a website collects information about your browser, operating system, screen resolution, and installed fonts — details that together are unique enough to identify you without storing any file. This is why blocking cookies alone does not stop all tracking.
Cookies are the oldest and most visible form of web tracking, which is why they get the most attention. But they are part of a larger ecosystem of tracking methods that websites and advertisers use to follow your behavior.
Frequently Asked Questions
Can cookies give websites access to my files or passwords?
No. Cookies are stored in a protected folder that only the browser can access, and only the website that set the cookie can read it back. A cookie from amazon.com cannot be read by google.com. Cookies cannot access your documents, photos, or any other files on your computer. They are text only.
Why do some websites ask me to accept cookies?
European privacy law (GDPR) and similar regulations in other countries require websites to tell you when they are setting cookies and get your permission first, especially for tracking cookies. The popup you see is the website complying with that law. In the United States, there is no federal requirement, so many sites do not ask.
If I delete my cookies, will websites know I deleted them?
No. Once you delete a cookie, it is gone from your computer. The website has no way to know you deleted it unless you visit again and it tries to read the cookie and finds nothing. At that point, it might set a new one, but it will not know you deliberately removed the old one.
Do I need to delete cookies regularly?
Not for security reasons. Cookies cannot harm your computer. You might delete them for privacy — to stop tracking cookies from following you — or to free up a small amount of disk space, though the amount is negligible. If you delete cookies from sites you use regularly, you will have to log in again.
What is the difference between cookies and cache?
Cookies are data that websites ask your browser to store and send back. Cache is data your browser stores on its own — copies of images, stylesheets, and other files from websites you visit, so the site loads faster next time. Cache is about speed; cookies are about memory and tracking.