Get a Pentest and security assessment of your IT network.

Cyber Security

Website Tracking Without Login

TL;DR

Yes, a website can often tell if you’ve visited before even without logging in, primarily using cookies and sometimes your IP address. This allows them to track basic behaviour like repeat visits.

How Websites Track You Without Login

  1. Cookies: The Main Method
    • Websites use small text files called cookies stored on your computer. These files contain information about your visit.
    • When you revisit the site, it checks for this cookie. If found, it knows you’ve been there before.
    • Types of Cookies:
      • First-party cookies: Set by the website you are directly visiting. Generally used to remember preferences or login details.
      • Third-party cookies: Set by a different domain than the one you’re visiting (often for advertising). They can track your browsing across multiple sites.
  2. Session Cookies vs. Persistent Cookies
    • Session cookies: These are temporary and deleted when you close your browser. They’re used to remember things during a single visit (like items in a shopping cart). They don’t allow tracking across visits.
    • Persistent cookies: These stay on your computer for a set period, even after you close the browser. This is how websites recognise repeat visitors.
  3. IP Address (Less Reliable)
    • Your IP address can identify your internet connection. While not unique to *you* personally, it can indicate a returning connection.
    • However, IP addresses change (especially for mobile users), so this isn’t very accurate. Many people share an IP address through network address translation (NAT).

How to Limit Tracking

  1. Browser Settings: Block Cookies
    • Most browsers allow you to block all cookies or just third-party cookies. Be aware this can break some website functionality.
    • Example (Chrome): Settings > Privacy and security > Cookies and other site data
  2. Privacy-Focused Browsers
    • Browsers like Brave, DuckDuckGo Browser, or Tor automatically block trackers and cookies.
  3. Browser Extensions
    • Extensions like Privacy Badger or uBlock Origin can block tracking scripts and cookies.
  4. Incognito/Private Browsing Mode
    • This prevents your browser from saving cookies, history, and other data during that session. It doesn’t make you invisible online, but it limits tracking within the session.

Checking for Cookies

  1. Developer Tools: Most browsers have developer tools to inspect cookies.
    • Example (Chrome): Right-click on a webpage > Inspect > Application tab > Cookies in the left sidebar.

Code Example: Setting a Cookie (JavaScript)

document.cookie = "username=John Doe; expires=Thu, 18 Dec 2024 12:00:00 UTC; path=/"

This sets a cookie named ‘username’ with the value ‘John Doe’, expiring on December 18th, 2024. The ‘path=/’ means it applies to all pages on the website.

Related posts
Cyber Security

Zip Codes & PII: Are They Personal Data?

Cyber Security

Zero-Day Vulnerabilities: User Defence Guide

Cyber Security

Zero Knowledge Voting with Trusted Server

Cyber Security

ZeroNet: 51% Attack Risks & Mitigation