What Is a Browser Cookie?

what-is-a-browser-cookie photo 1

We’ve recently been hearing about tracking cookies and laws in the European Union forcing websites to explain their use of cookies to their visitors. If you’re wondering what cookies are and what all the fuss is about, you’re not alone.

Cookies are an important browser feature – if you disable cookies, you’ll find yourself unable to log into websites. While cookies have important, good uses, they also have more questionable uses.

What’s a Browser Cookie?

Cookies are small pieces of information websites store on your computer. Cookies only contain bits of text, not anything else. The text can be a user ID, session ID, or any other text. For example, web pages can be configurable – a web page could have a Hide link that hides a certain element on the page. The page can save this setting on your computer with a cookie. When you load the page in the future, the page can examine the cookie and automatically hide the element.

If you clear your cookies, you’ll be logged out of all websites and websites won’t remember any settings you’ve changed on them.

Cookies are very common – you probably have hundreds or even thousands stored in your browser right now.

what-is-a-browser-cookie photo 2

How Cookies Work

Your web browser stores and manages cookies. You can find a list of websites storing cookies and view the cookies themselves – although it’s usually not interesting to look at the content of the cookies – in your browser’s settings. If you use multiple web browsers on your computer, each browser has its own set of cookies.

Websites are only allowed to look at their own cookies – for example, when you visit How-To Geek, we can’t examine cookies from other websites. This prevents malicious websites from snooping and stealing your login sessions.

what-is-a-browser-cookie photo 3

Good Uses for Cookies

As we’ve seen, cookies have a number of very important uses. The web wouldn’t be what it is without them today.

  • Cookies store your login state. Without them, you wouldn’t be able to log into websites. Websites use cookies to remember and identify you.
  • Cookies store preferences on websites. You couldn’t change settings and have them persist between page loads without cookies.
  • Cookies allow websites to provide personalized content. For example, if you’re shopping on Amazon, Amazon can remember the products you’ve browsed and recommend similar products – even if you’re not logged in.

what-is-a-browser-cookie photo 4

“Bad” Uses for Cookies

However, cookies can also be used for more questionable purposes. Advertising and tracking networks use tracking cookies to track you across the web. When you visit website that uses scripts from an advertising network, that network can set a cookie in your browser. When you visit another website that uses tracking scripts from the same network, the advertising network can check the value of your cookie – it knows the same person visited both websites. In this way, the advertising networks track you across the web.

This information is used to target ads to you – for example, if you search for car insurance and later visit a news website, you may see advertisements for car insurance on the news website. The advertisements may not be related to the website you’re currently on, but they will be related to the websites you were visiting before. Depending on the advertising network, you may be able to opt out of this – as with the Google Ads Preferences page, which also shows the advertising categories you’ve been assigned by Google based on the websites you’ve been tracked across.

what-is-a-browser-cookie photo 5

Tracking networks can also use the data for other purposes – for example, selling aggregated browsing data to others.

Managing Your Browser’s Cookies

You can manage your browser’s cookies from its settings window. Each browser’s Clear Private Data tool will also delete cookies. For information on viewing and clearing your browser’s cookies, see our article on deleting cookies in the five most popular browsers on Windows.

One problem with clearing cookies is that it will log you out of sites you use. If you want to stay logged into the websites you use but block other websites from using cookies, check out our guide to blocking all cookies except for the sites you use. Bear in mind that some websites won’t work properly if you disable cookies for them.

More stories

Desktop Fun: Forests Wallpaper Collection Series 2

Forests are wonderful places where we can escape our hectic lives and enjoy the quiet, peaceful beauty waiting there for us. Bring the serenity of life among the trees to your desktop with the second in our series of Forests Wallpaper collections.

How to Create AppArmor Profiles to Lock Down Programs on Ubuntu

AppArmor locks down programs on your Ubuntu system, allowing them only the permissions they require in normal use – particularly useful for server software that may become compromised. AppArmor includes simple tools you can use to lock down other applications.

How Lead-Acid Batteries Work [Video]

Every morning when you go out and start your car, you’re pulling power from a lead-acid battery. But how exactly do they work? In this informative video we see how lead plates and sulfuric acid provide the power your car craves.

Microsoft Discontinuing Windows Home Server

As part of their ongoing push to simplify their product lineups, Microsoft is discontinuing their popular small office/home server platform Windows Home Server. On to see the new alternative for small volume users.

Friday Fun: Liquid

In this week’s game you will need a mix of patience, timing, and a touch of strategy in order to achieve victory in this physics puzzler. Can you successfully control all of the liquid while moving it towards a victorious finish or will it all ‘go down the drain’?

What Is AppArmor, and How Does It Keep Ubuntu Secure?

AppArmor is an important security feature that’s been included by default with Ubuntu since Ubuntu 7.10. However, it runs silently in the background, so you may not be aware of what it is and what it’s doing.