Skip to content
Tutorials Center
My learning

Topics

Lesson 38 of 55 ยท Security and Care

Online Privacy and Tracking

Learn how websites and apps track you with cookies, trackers and fingerprinting, what VPNs and private browsing really do, and the settings and habits that protect your privacy.

Every time you use the Internet you leave traces: the sites you visit, what you search for, where you are, which device you use. Some of it is needed to make a service work. Much of it is collected to build a profile of you for advertising or sale. Privacy means having control over who can see and use information about you.

Security (stopping attackers) and privacy (controlling who knows what) overlap but are not the same. A site can be perfectly secure and still share your browsing history with fifty advertisers. This lesson explains how tracking works, which tools help and which do not, and gives a short list of settings worth changing. It builds on Malware and Safe Habits, Passwords and Encryption and the cookies section of How the Web Works.

What is collected, and by whom

Who What they can see Why
Websites you visit Pages you view, what you type into forms, your IP address and device details To run the service, and to measure and personalize
Advertising and analytics companies Your activity across many sites, through trackers embedded in them To target ads and build interest profiles
Apps Contacts, location, photos, microphone, camera if you allow it Features, but also data collection
Your Internet provider Which domains you connect to (not the content of HTTPS pages) Running the network; in some places selling data
Your employer or school Traffic on their network and devices Security and policy
Data brokers Records combined from many sources Selling profiles
Governments Whatever law allows them to request Law enforcement and surveillance

How tracking works

Cookies

A cookie is a small piece of text a website asks your browser to store and send back on later visits. First-party cookies come from the site you are visiting and keep you signed in or remember your cart. Third-party cookies come from another domain embedded in the page (an ad network, a "Like" button) and can recognize you on every site that embeds the same service, which makes cross-site tracking possible. Browsers such as Safari and Firefox block third-party cookies by default, and Chrome offers controls to do so.

Python Reading a Cookie header

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Trackers, pixels and scripts

A tracking pixel is a tiny (often invisible) image loaded from an advertiser's server: the request itself tells them your IP address, browser and the page you are on. Scripts from analytics and advertising companies run in the page and record clicks, scrolling and typing. Emails use pixels too, to tell a sender when you opened a message. Blocking remote images in your mail client prevents it.

Fingerprinting

Even without cookies, a site can recognize your browser by combining small details: screen size, installed fonts, time zone, language, graphics card, browser version. Each detail is shared by many people, but the combination can be nearly unique. This is browser fingerprinting. The information content is measured in bits: each bit halves the number of people who match, and about 33 bits are enough to single out one person among eight billion.

Python How many bits of identity does a fingerprint reveal?

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

(The shares are invented to show the arithmetic; real values vary.) The defence is to look like everyone else: popular browsers and settings, and browsers that deliberately reduce what they reveal (Tor Browser, Firefox's and Brave's protections).

Location and accounts

Your IP address gives a rough location (city level) to every site. Phones know your exact location from GPS, Wi-Fi and cell towers, and many apps ask for it. Being signed in to a large account (Google, Apple, Facebook, Microsoft) lets that company link activity across its services. Photos can carry metadata (EXIF) including the time and GPS position where they were taken; most messaging apps strip it, but sending the original file may not.

Tools: what they do and do not do

  • Private browsing (Incognito) only stops your own browser from saving history, cookies and form data on this device after you close the window. Websites, your employer, your provider and trackers still see everything. It does not make you anonymous.
  • A VPN (virtual private network) encrypts your traffic and sends it through the VPN provider's server. Your Internet provider and the local Wi-Fi owner can no longer see which sites you use, and sites see the VPN's IP address rather than yours. It does not stop cookies, fingerprinting or logging in to accounts, and you must trust the VPN company, who sees what your provider used to see. It is useful on untrusted public Wi-Fi or to change your apparent location; it is not a shield against tracking.
  • Tracker and ad blockers (uBlock Origin and built-in blockers) stop scripts and pixels from loading, which cuts tracking and speeds up pages.
  • HTTPS hides page contents from others on the network, but the site still knows what you do on it.
  • Password managers and two-factor authentication protect accounts, which are a privacy matter as well as a security one.
  • Tor routes traffic through several volunteer relays so that no single party knows both who you are and what you visit; it is slow but strong for anonymity.
  • End-to-end encrypted messaging (Signal, WhatsApp, iMessage) means only you and the recipient can read messages, not even the company; metadata (who talks to whom) may still be visible.

Settings and habits that help

  1. Review app permissions. On your phone, check which apps can use location, microphone, camera, contacts and photos. Choose "only while using" or "never".
  2. Browser settings. Block third-party cookies, turn on tracking protection, clear cookies from time to time, and choose a search engine that does not profile you if you wish.
  3. Ad settings. Turn off ad personalization in your Google, Apple and social media accounts and delete stored activity history.
  4. Social media. Set profiles to private, limit who can see posts and tags, and think before posting your location, school, workplace or children's photos.
  5. Cookie banners. Choose "reject all" or manage preferences; "accept all" opts you into tracking.
  6. Use different email addresses (or aliases) for important accounts and for newsletters and shopping, so that one leak or sale does not expose everything.
  7. Share less. The data you never give out cannot be leaked. Do not fill optional form fields.
  8. Keep software updated and use strong, unique passwords with two-factor authentication.
  9. Read what you agree to, at least the summary: what is collected, who it is shared with, and how to delete it. Laws such as the GDPR in Europe and similar laws elsewhere give you rights to see, correct and delete your data and to refuse some uses.

Privacy and the bigger picture

Privacy is not about having something to hide. It is about context and choice: you tell your doctor things you would not tell an employer. Data once collected can be breached, sold, or used years later in ways you did not expect, so it is easier to limit collection than to undo it. Be thoughtful about other people's privacy too: ask before sharing a photo of a friend, and respect the rules of the networks you use. See Digital Ethics, Licensing and Responsible Use.

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. What does private (Incognito) browsing do?

    Private mode only stops local storage of history and cookies. Sites, trackers, employers and providers can still see your activity.
  2. 2. What is a third-party cookie?

    Third-party cookies come from embedded services and can recognize you across many sites, which enables cross-site tracking.
  3. 3. Which statement about VPNs is correct?

    The VPN provider sees what your provider used to see; cookies, logins and fingerprinting still identify you.
  4. 4. What is browser fingerprinting?

    The combination of screen size, fonts, time zone and other details can be nearly unique, so it works even when cookies are blocked.
  5. 5. Which habit best reduces the data collected about you?

    Collection is easier to limit than to undo: restrict permissions, decline tracking and avoid optional data.

Summary

  • Privacy is control over who knows what about you; it overlaps with security but is not the same.
  • Websites, advertisers, apps, providers, brokers and governments collect different data for different reasons.
  • Tracking uses first- and third-party cookies, pixels and scripts, fingerprinting, IP addresses, location data, account sign-ins and photo metadata.
  • Private browsing only avoids local traces; a VPN moves trust to the VPN company; ad blockers, HTTPS, Tor and end-to-end encryption each cover a different part.
  • Review app permissions, block third-party cookies, turn off ad personalization, use aliases and share less.
  • Laws such as the GDPR give you rights to access, correct and delete your data.

Next: Digital Ethics, Licensing and Responsible Use.