How Ad Blockers Work
An ad blocker watches for the network requests that fetch adverts and trackers, then stops them before they load. The page still renders, minus the advert bytes. Blocking at the network layer cuts data, speeds up loading, and removes most tracking.
Why it matters
Before a webpage displays an advert, your browser fetches it from an ad network. That's a network request. That request takes time and data. The advert itself is bytes over the wire. An ad blocker stops these requests from being sent. The bytes never download. The page loads faster and uses less data.
Beyond speed, most adverts come from third-party ad networks, and those networks track you. They see which sites you visit and what you do on them. An ad blocker stops those requests too, which cuts off a large part of the tracking web.
How it works
When you load a webpage, the browser makes dozens of requests: one for the HTML, one for each stylesheet, one for each image, one for each script, and so on. Adverts and trackers are just more requests.
An ad blocker intercepts these requests before they're sent. It checks each request against a set of rules. The rules say: "This URL pattern is an ad network, block it" or "This URL pattern is a tracker, block it" or "This URL is a legitimate third-party script, let it through."
Chrome's ad blockers use the declarativeNetRequest API. The blocker provides Chrome with a ruleset. Chrome applies those rules to every request. If a request matches a block rule, Chrome cancels it. The request never leaves your computer. The server never gets asked. The advert never downloads.
The page still renders and functions. If an advert was displayed on the page, you'll see an empty space where it would have been. That space is empty because the advert bytes never arrived. Everything else on the page works normally.
What does not matter
Manifest V3 did not kill ad blocking, though headlines claimed it did. What changed is the mechanism. Old blockers used the webRequest API, which watched every request but required the extension to have access to your browsing history. New blockers use declarativeNetRequest, where Chrome applies the rules itself. The extension never sees your traffic.
This is actually better for privacy, not worse. A blocker built on declarativeNetRequest can stop adverts and trackers without ever knowing where you browse.
Network blocking cannot hide empty boxes left behind by blocked adverts. A page's HTML might reserve space for an advert: a 300-by-250 pixel box, say. When the advert request gets blocked, the box is empty. Hiding that box requires CSS changes, which is a cosmetic job. Scalpel v1 does network blocking only, so empty ad spaces persist on some pages.
Code example
When you visit a news site, the HTML might include:
<script src="https://ads.adnetwork.com/loader.js"></script>
A blocker with a rule for that ad network's domain will stop this request. In Scalpel's ruleset format (declarativeNetRequest), it looks like:
{
"id": 1000,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"urlFilter": "||ads.adnetwork.com^"
}
}
When your browser tries to load https://ads.adnetwork.com/loader.js, Chrome checks it against this rule. It matches. Chrome cancels the request. The ad never loads. The bandwidth is saved.
If the page relied on that script for some reason and broke, you could add the site to your allowlist, which would add an allow rule with higher priority:
{
"id": 5000,
"priority": 100,
"action": {
"type": "allowAllRequests"
},
"condition": {
"urlFilter": "||thatsitewhichneedads.com^",
"resourceTypes": ["main_frame"]
}
}
Now requests on that site would go through.
How Scalpel Ads Blocker shows it
Scalpel bundles two filter lists by default: EasyList (adverts) and EasyPrivacy (trackers). It converts both to declarativeNetRequest rules at build time. When you click the extension icon, the popup shows how many requests were blocked on the current page. That number is real: Scalpel asked Chrome for a count of matched rules via the getMatchedRules API, which runs only when you open the popup.
If a page breaks because of blocking, you can allowlist the site from the right-click menu. Scalpel adds one dynamic rule per domain, so that site's requests go through unrestricted while everything else stays blocked.
Scalpel stays within Chrome's guaranteed 30,000-rule limit by bundling the most common blocking rules and shipping less-common ones as optional rulesets you can enable in settings.