Why do websites use cookies?

Updated at: Feb 19, 2022

In short: to remember you, or something about you

This simplest answer to the question is: Websites use cookies to remember something about you as you browse that website. Very often it's just a unique, random "token" that they give you, to remember who you are as you browse their website.

You may not realise, but ordinarily, every single time you load any page from a website, the website you're visiting actually has no idea what other pages you've already loaded from their website, or what you've already done on their site so far - it has no idea if you've added something to a Shopping Cart, Logged In, started a survey, played a video or any thing else. Each time a page loads, it's completely "fresh" and stand alone.

This is a problem for websites who need to follow your movement across their website; for example, if you log in and then request a members-only page, since that second request for the second page is unrelated to the first request; how would the website know if you're logged in yet or not, and thus how would it know what to show you?

Enter: cookies. Cookies are a way for a website to link your different requests together; to know that the same user logged in, added an item to the shopping cart, went back to browsing products and then went back to the cart. Without cookies, the website would just see four seperate requests; but if it uses a cookie, it can see that the same user did those four things and know which user account it was.

If you don't have cookies enabled, you probably won't be able to log into websites or use many other common features of websites.

Why would some people want to disable Cookies?

As you can see from the example above, cookies are vital for the functionality on most websites, so why would anyone want to disable them?

The answer is the same reason they're useful: They're good for tracking you!

However, it's not really the cookies from the website that you're visiting which are a privacy problem - because typically, if you trust a website enough to browse it, log into it and generally interact with it, you probably trust it enough to accept First-party cookies from it...

The problem is that some websites will embed Advertising Code, Analytics Code or Social Network extensions (like the Facebook Like! button) from other companies. It's the cookies that those other companies set - known as Third-Party cookies - which are used to track your activity and build a digital profile of you and your life.

So to help prevent Advertising Companies, Social Network Companies and Analytics companies from tracking their activity, many users choose to block websites from setting Third-Party cookies on their devices. It's also possible to use various browser addons/extensions to do this too.