Syllabus Lesson 52 of 156 · Build a blocker
Build a blocker

How a browser does it for you

Why it matters You have now built every piece of a blocker by hand. Real browsers and extensions do the same jobs, at scale, on every page. Knowing how they work helps you choose one, set it up well, and understand what it can never do.

Same jobs, bigger scale

Think of your Python blocker as a hand-built bicycle. Real blockers are the same machine made in a factory: same wheels and chain, but tested on millions of roads. Each piece you wrote has a real counterpart:

You builtReal blockers
Filter list parser (lesson 46)Read lists like EasyList and EasyPrivacy with tens of thousands of rules, plus many more options than ours.
Index and matcher (lesson 47)Compile the lists at start-up into fast look-up structures, so each request is checked in microseconds.
Heuristics (lesson 48)Some browsers learn trackers from behaviour on your own device.
Link cleaning and bounces (lesson 49)Strip known parameters and clear storage of sites that only redirect.
Uniform traits (lesson 50)Reduce or randomise what fingerprinting scripts can read.

Blockers in extensions (checked October 2026)

Extension: a small add-on program you install into a browser. Blocker extensions are usually written in JavaScript.

Extensions such as uBlock Origin are written in JavaScript and run inside the browser. How much power they have depends on the browser:

  • Chrome now runs only extensions built on its Manifest V3 rules. A blocker hands the browser a fixed set of rules in advance (the declarativeNetRequest system) instead of deciding on each request itself. The extension no longer needs to see each request, but it is less flexible, which is why some blockers ship a lighter version for Chrome.
  • Firefox still lets extensions inspect and block each request as it happens, so full-strength blockers keep working.
  • Safari uses content blockers: the extension gives Safari a list of rules, and Safari applies them without the extension seeing your browsing.

Blockers built into the browser (checked October 2026)

  • Firefox Enhanced Tracking Protection is on by default and uses a tracker list (from Disconnect), plus Total Cookie Protection, which gives every site its own cookie jar.
  • Safari Intelligent Tracking Prevention uses an on-device classifier, a heuristic like yours but trained, to spot trackers from behaviour, and blocks third-party cookies.
  • Brave Shields blocks with a filter-list engine written in Rust, the same idea as your index but tuned for speed, and randomises fingerprinting values (farbling).

One honest look at Floati Shields

Floati's own browser, still in development (checked October 2026), has Shields built into its engine, which is also written in Rust. Shields can be set per site, and it combines a filter list with an on-device tracker detector (the same idea as lesson 48), partitioned cookies and fingerprint randomisation (farbling). A shield in the address bar shows what was blocked on the current page.

Honestly, it has the same limits as every blocker. A list or a heuristic can miss a brand-new tracker, and blocking can break a site that then needs Shields lowered. No blocker can stop tracking that happens on the site's own server, or tracking you agree to by logging in. We built it, so we are not neutral: compare it with others using the precision and recall thinking from the last lesson.

A common misconception

"Two blockers are twice as safe." Running several blockers at once usually adds breakage and slowness without much extra protection, because their lists overlap. One good blocker, set up well, beats three fighting each other.

Try it Open your browser's tracking protection settings (in Firefox: Settings, Privacy and Security; in Safari: Settings, Privacy; in Brave: the lion icon in the address bar). Find where it lists what was blocked on the current page, and match each entry to one of the techniques you built.

Recap

  • Real blockers do what you built: parse lists, index rules, use heuristics, clean links, reduce fingerprints.
  • Browsers differ in how much power they give blocker extensions (checked October 2026).
  • Built-in protections (Firefox, Safari, Brave, Floati) work without an extension.
  • Every blocker misses something and breaks something; judge them with precision and recall.

Spotted a problem in this lesson? Report it

Code · runs in your browser
Output