What Are Cookies on a Computer?

Internet cookies aren't flavorful, but they are everywhere you go

Cookies are very small text files placed on your computer by a web server when you view some sites online (not all websites place cookies). They store data about you and your preferences so that a web server doesn't have to repeatedly request this information, potentially slowing download time.

Cookies are commonly used to store personal registration data like your name and address, the contents of a shopping cart, your preferred layout for a web page, what map you might be looking at, and so on. They make it easy for web servers to personalize information to fit your specific needs and preferences when you're visiting a website.

Chocolate chip cookie on a laptop keyboard representing internet cookies
Rara Subair / EyeEm / Getty Images

Why Are They Called Cookies?

There are different explanations for where cookies got their name. Some people believe the term came from "magic cookies," which are part of the UNIX operating system.

Others think the name originates from the story of Hansel and Gretel, who were able to mark their trail through a dark forest by dropping cookie crumbs behind them.

Are Computer Cookies Dangerous?

The easiest answer is that cookies, in and of themselves, are completely harmless. However, some websites and search engines use them to track users as they browse the web, collecting highly personal information and often surreptitiously transferring that information to other websites without permission or warning. This is why we might hear about web cookies in the news.

Can Cookies Be Used to Spy on Me?

Cookies are simple text files that cannot execute programs or carry out tasks. Nor can they be used to view data on your hard drive, or capture other information from your computer.

Furthermore, cookies can only be accessed by the server that initiated them. This makes it impossible for one web server to snoop around in cookies set by other servers, grabbing sensitive bits of your personal information.

First-Party vs Third-Party Cookies

Both types are stored on your computer and are used for similar reasons, but they're differentiated based on who created the cookie and how they're used.

A first-party cookie is created by the website you're visiting, while a third-party cookie is created by other sites through the site you're visiting. Like we said above, both types can be accessed only by the server that made it.

The use of third-party cookies isn't as obvious as first-party ones since when you visit a website, you might not assume that there are scripts handled by outside sites that are dropping cookies onto your computer. They're often created through code embedded in a third-party tool or ad. Some browsers automatically block third-party cookies.

What Makes Internet Cookies Controversial?

Although cookies can only be retrieved by the server that set them, many online advertising companies attach cookies containing a unique user ID to banner ads. Many of the major ad companies online serve ads to thousands of different websites, so they can retrieve their cookies from all of these sites, too. Although the site that carries the ad can't track your progress through the web, the company that serves the ads can.

This is where the scare of third-party cookies comes into play. But while this might sound ominous, tracking your progress online isn't necessarily such a bad thing. When tracking is used within a site, the data can help site owners tweak their designs, enhancing popular areas and eliminating or redesigning "dead ends" for a more efficient user experience.

Tracking data can also be used to give you and site owners more targeted information or to make recommendations on purchases, content, or services, a feature many people appreciate. For example, one of Amazon's most popular retail features is the targeted recommendations it makes for new merchandise based on your past viewing and purchase history.

Should I Disable Cookies on My Computer?

This is a question that has different answers depending on how you want to use the web.

If you go to websites that personalize your experience extensively, you won't be able to see much of that if you disable or clear your cookies.

Many sites use these simple text files to make your web browsing session as personalized and efficient as possible, simply because it's a much better user experience to not have to keep entering the same information every time you visit. If you disable cookies in your web browser, you won't get the benefit of the time saved by these cookies, nor will you have a completely personalized experience.

You can implement a partial stop on web cookies by setting browsers on a high sensitivity level, giving you a warning whenever a cookie is about to be set and allowing you to accept or reject them on a site-by-site basis. However, because so many sites use cookies these days, a partial ban will probably force you to spend more time accepting or rejecting them than actually enjoying your time online. It's a trade-off and really depends on your level of comfort.

The bottom line is this: cookies really do no harm to your computer or your web browsing experience. It's only when advertisers aren't as ethical as they should be with the data stored in your cookies where things get into a bit of a gray area and your online privacy begins to become an issue. Still, your personal and financial information is completely safe, and cookies are not a security risk.

How to Manage Cookies

There are a few ways to deal with cookies in your browser. To accept them and use them normally, you don't need to make any changes to the web browser's settings or request them from the site. Just browse normally, and if the website needs to drop a cookie, it will.

Cookies are enabled by default for most browsers. However, if you're browsing the web anonymously with a private web browser, or you've manually disallowed all sites from saving cookies, then cookies might be completely disabled. You can enable cookies in your browser to use them.

However, you do have some control over browser cookies. Maybe you want to browse the web without storing cookies, or you want to remove browser cookies from a particular website.

A web proxy is one way to use the internet without cookies being stored in your browser. Not all proxies support disabling them, though, so be sure to look for that feature. It's more common with anonymous web proxies.

Another way is to use cookies temporarily, automatically deleting them when you're done with the site. You can do that by using the website in private browsing mode.

Or, if you want to use cookies to keep your login information saved and utilize their other benefits, you can always manually delete them later. You can also clear cookies for one specific site so the others aren't affected.

You can also see which cookies are stored in your browser. How you do this is different for every browser (and some don't let you), but in Chrome, for example, you can enter chrome://settings/content/all as a URL to jump right into those settings.

Cookies are used in mobile web browsers, too. Learn how to clear cookies on Android to do that, or how to delete cookies on iPhone.

Cookies: A History

Cookies were originally designed to make life easier for web searchers. Popular sites like Amazon, Google, and Facebook use them to deliver highly customized, personal web pages that deliver targeted content to you.

Unfortunately, some websites and internet advertisers have found other uses for them. They can and do gather sensitive personal information that might be used to profile you with advertisements that seem almost intrusive with how targeted they are.

Cookies do offer quite a few very useful benefits that make web browsing more convenient. On the other hand, you might be concerned that your privacy has the potential to be violated. However, this isn't something that you should necessarily be concerned about. Cookies are absolutely harmless.

Was this page helpful?