Privacy

How Cookies Track You Across the Internet (And How to Stop Them)

Cookies are small files that websites store on your device. Some are essential, but many exist solely to track your behavior. Learn the difference and take back control.

Raimundo Coelho
Raimundo CoelhoCybersecurity Specialist
February 10, 2026
3 min read
How Cookies Track You Across the Internet (And How to Stop Them)

What Are Cookies?

Cookies are small text files that websites store on your device through your browser. They were originally invented to help websites remember useful information — like keeping you logged in or remembering your shopping cart. However, the advertising industry transformed cookies into a powerful tracking mechanism that follows you across the entire internet.

Types of Cookies

First-Party Cookies

Created by the website you are visiting. These are generally useful and harmless — they keep you logged in, remember your preferences, and maintain your shopping cart. Blocking all first-party cookies would break most websites.

Third-Party Cookies

Created by domains other than the one you are visiting. These are the tracking cookies. When a website loads an ad from an advertising network, that network places a cookie on your device. As you visit other sites that use the same ad network, the cookie tracks your behavior across all of them, building a detailed profile of your interests and habits.

Session vs Persistent Cookies

Session cookies disappear when you close your browser. Persistent cookies remain for weeks, months, or even years, maintaining tracking profiles long after your initial visit.

Here is a simplified example of cross-site tracking:

  1. You visit a news website that loads ads from AdNetwork.com
  2. AdNetwork.com places a cookie on your device with a unique ID
  3. You visit a shopping site that also uses AdNetwork.com
  4. AdNetwork.com reads the same cookie and now knows you visited both sites
  5. This process repeats across thousands of websites, building a comprehensive profile

This profile is used to serve targeted ads, but the data itself can be sold, leaked in breaches, or used for purposes you never consented to.

How to Manage Cookies

Browser Settings

Every major browser lets you control cookies:

  • Block third-party cookies — This is the single most impactful change. Chrome, Firefox, Safari, and Brave all support this
  • Clear cookies on exit — Configure your browser to delete cookies when you close it
  • Cookie exceptions — Allow cookies only for sites you trust and use regularly

Browser Extensions

  • uBlock Origin — Blocks tracking scripts before they can set cookies
  • Cookie AutoDelete — Automatically deletes cookies from closed tabs
  • Privacy Badger — Learns and blocks invisible trackers

Those annoying cookie popups are legally required in many jurisdictions. Always choose "Reject All" or "Essential Only" when the option is available. Extensions like "I Don't Care About Cookies" can auto-reject tracking cookies for you.

Beyond Cookies

The advertising industry is developing new tracking methods that do not rely on cookies — browser fingerprinting, server-side tracking, and cohort-based targeting. Staying informed about these evolving techniques is essential for maintaining your privacy.

Combine cookie management with careful URL tracking awareness and browser privacy settings for comprehensive browsing privacy.

privacycookiestracking
Raimundo Coelho
Written by

Raimundo Coelho

Cybersecurity specialist and technology professor with over 20 years of experience in IT. Graduated from Universidade Estácio de Sá. Writing practical guides to help you protect your data and stay safe in the digital world.

You might also like