How Cookies Track You on the Web and What to Do About it

By Sowmya G

Published on 31st Jul 2019|Last updated on 19th Aug 2021

Have you ever taken a look at your browser settings and checked the list of cookies it has accumulated over time? If not, you must do it. You will be surprised to see a long list there. Websites store them, often without your knowledge, for their use. Cookies have a wide range of purposes.

how cookies trackManually checking cookies set by CookieLawInfo

This article explains how cookies track you on the web and what measures you can take to avoid it. 

What are cookies?

Before we discuss how cookies track you, let’s first understand what exactly cookies are.

Cookies are small text files that store information in your browser. When the user visits a website, it might store some cookies to recognize the user in future visits. When you visit that website again, it will remember your last visit. These cookies keep track of your time, customize your browsing experience, and display targeted ads. 

Cookies can be classified based on different characteristics. 

  • Based on their purpose, there are two types of cookies, necessary and non-necessary. The necessary cookies are the ones that are essential for the functioning of a website. Whereas, the non-necessary cookies are the ones that are added additionally by the website and are not often important for the functioning of the website.
  • Based on their origin, cookies can be divided into first-party and third-party cookies. First-party cookies are set by the website itself that the user is currently visiting, to check whether the user is logged in. In contrast, other websites or third-party servers set third-party cookies to track the user for targeting relevant advertisements.
  • Based on their duration, cookies can be divided into persistent and session cookies. Websites set session cookies when the user starts a session. They expire once you close the browser, and the session ends. Persistent cookies, on the other hand, stay on the user’s browser for a longer period and only die when they reach their expiration period.

How do cookies track you?

When you load a website, it stores the cookie on the users’ device in a cookie file. The cookies have a unique ID for each user. The creators of cookies use these IDs to identify users and track them online. Cookies collect information – online habits, previous visits, search history, etc. – and pass them on to the servers of the cookie owners. This information is then used for targeted advertisements and personalized content. 

Cookies from another website that you have not visited can also track you. This usually happens when the web page you are currently on hosts resources from another website. Because of this, the cookies from that website get stored on your device, facilitating the cookie server to track your online behavior.

Are cookies that bad?

Cookies are in general useful for your website. It assists your website to function properly and provides additional services that your business may require. However, cookies that track you are more of a privacy concern than dangerous. They store all the information in the background. And they do it often without user consent. 

Imagine an unknown entity monitoring your online activities and hoarding up your personal information. Sounds invasive, right? Maybe this is why we needed stricter laws, like the General Data Protection (GDPR) and the EU Cookie Law, to regulate it.

GDPR interprets data collected by cookies as personal. As per the Regulation, you must get users’ consent before you collect any personal information from them, and this consent must be freely given, specific, informed, and unambiguous. Hence, using tracking cookies without requesting and obtaining consent is not legal and will result in fines and penalties. 

With the application of GDPR and the Cookie Law, it has become essential to get explicit consent before using the cookies. Cookie banners should, therefore, clearly state the consent request and follow the GDPR requirements.

You should be aware of what cookies are tracking you, or if you are a website owner, what tracking cookies are your website using. CookieServe is a free online cookie checker that will let you the details of the cookies used by any website. Read more here.

How to stop these cookies?

There are several ways to block third-party cookies. Your browser settings can make it happen. In different browsers, there are various mechanisms present to block cookies and third-party cookies of websites. Note that blocking all cookies might cause the site to malfunction, as some cookies are necessary for the functioning of the website. There are two ways to go about it: one is by blocking the cookies from the settings and the other, enabling the “Do Not Track” (DNT) feature.

To get rid of cookies already stored in the browsers, you can search for settings to clear cookies and delete them from the system.

How to block cookies on different websites?

All major browsers have options to let users block or remove third-party tracking cookies. Let’s see how you can stop the websites from storing these cookies on your web browsers.

Google Chrome

If you are a Google Chrome user, go to the settings and search for cookies and other site data. You will find the option to block third-party cookies.

Enabling it will turn off these cookies on Chrome.

You can also view all the cookies collected from different websites and delete them.

Microsoft Edge

Here too, the user needs to go to Settings and then to the section Privacy and Security. Here you’ll see an option to block third-party cookies.

Mozilla Firefox

If you are a Firefox user, go to Open Menu and then Options. Under Privacy and Security, you can find an option to block third-party cookies.


If you are an Opera user, go to the Opera icon on your browser and search for settings. Go to Advanced settings, here you will find the option Cookies. You can block third-party cookies.

You can also view all the cookies collected from different websites and delete them.


If your browser is Safari, go to Preferences and find the option privacy. There you will find the option to block all cookies.

For step-by-step guidance, please refer to Ways to Block Cookies in Different Browsers.

How do you enable Do Not Track in web browsers?

Do Not Track (DNT) is a special feature available in all the browsers mentioned above (except Safari) that lets users signal the websites to stop tracking them. Even though not all websites respect the DNT setting, it is one feature that users can utilize. 

You can go to the settings and see the DNT option under privacy and security tabs in most browsers.

Learn how to enable this feature in different browsers in detail here.

How to control cookies on your website?

If you are a website owner and concerned about regulating tracking cookies for GDPR, you can adopt the following practices:

  • Do not load tracking cookies unless you get consent from users.
  • Give users the option to block tracking cookies when they visit the website.
  • Never block access to websites or services if they deny consent.
  • Inform them about the cookies and what opting in will mean before you ask for consent.
  • Give them granular consent for accepting or denying consent for various types of cookies.
  • Let users withdraw cookie consent any time they wish.
  • Give easy access to the policy page where you disclose details about all data collection and use via cookie identifiers.
  • Keep a record of consent for proof of compliance.

CookieYes GDPR cookie consent is a smart solution for obtaining and managing consent for cookies.

You can add a customizable cookie banner and also manage auto-blocking of third-party tracking cookies before consent. You can let users selectively give consent to cookies and withdraw it at any time. You can also keep a log of all cookie consent. With its geolocation feature, you can decide to display the banner only to visitors from the EU. It is easily compatible with multilingual websites as it supports over 30 languages.

cookieyes cta for tracking cookies

There is much more and it is totally worth it. Try it for free!

Disclaimer: This article is only intended for general information and does not represent legal advice. Hence, for any legal assistance, please contact a professional.

Make Your Website GDPR Compliant With CookieYes

CookieYes is a new and easy solution to make your website comply with the GDPR Cookie Law from Cookie Law Info. Join the 1 Million+ website using our solutions now!

Sowmya G

Sowmya is a technical content writer for Cookie Law Info. She writes mostly about online privacy and privacy laws. When she's not writing, she likes to sing and read books.