How AdOff Works: The Technology Behind Stealth Ad Blocking
Most ad blockers operate with a single tool: a list of URLs to block. It works until a site detects them, and then the cat-and-mouse game begins. AdOff was built differently, from the ground up, using three independent layers of protection that work together to deliver a truly seamless and invisible browsing experience.
This page explains exactly how each layer works, with enough technical detail for the curious, but written so anyone can follow it. Whether you're a developer wanting to understand the architecture, or a regular user wondering why AdOff keeps working when others give up, you're in the right place.
Layer 1. Network Blocking
Active on all plansThe first and most efficient layer operates at the network level, stopping HTTP requests tied to ads before they're even downloaded by the browser. No data is fetched, no scripts are executed, no tracking pixels are loaded. The resource simply is never retrieved.
๐ง Chrome API: declarativeNetRequest
AdOff uses Chrome's declarativeNetRequest API, the same modern API
used by enterprise security tools. Unlike the previous
webRequest API, declarativeNetRequest is evaluated natively by the browser engine
with no JavaScript overhead. Rules are compiled once at installation and
applied at near-zero CPU cost for every subsequent request.
107+ Precision Blocking Rules
AdOff includes 107 hand-selected network rules that target the distribution infrastructure of the largest ad networks. Rather than maintaining a massive list of individual domains requiring constant updates, AdOff's rules target the structural patterns of ad distribution:
- Ad server domains, the hostnames that deliver banners, pre-roll video, and sponsored content
- Tracking and analytics endpoints, pixels, beacons, and event collectors that profile your behavior
- Retargeting infrastructure, cross-site trackers that follow you from site to site
- Programmatic ad exchange URLs, real-time bidding endpoints that auction off ad slots
- CDN paths used exclusively for ads, content delivery patterns specific to ad payloads
Why Network-Level Blocking Matters
When an ad is blocked at the network level, the page loads faster. It's not just about removing a visible banner, it means the browser never opens TCP connections to ad servers, never performs DNS lookups for tracking domains, and never executes third-party JavaScript that ads depend on for display and measurement.
Studies on ad-heavy news sites consistently show that network-level blocking reduces page load times by 30-60%. Every blocked ad request is a connection that doesn't open, a script that doesn't parse, and a payload that doesn't consume your bandwidth.
โก Performance advantage
Because declarativeNetRequest rules are evaluated by the browser's C++ engine, not JavaScript, AdOff adds zero CPU overhead during normal browsing. Matching happens before the network stack starts the request. No JavaScript executes per-page, and the extension actually uses zero memory when idle.
Layer 2. Cosmetic Filtering
Active on all plansNot all ads arrive via network requests that can be pre-blocked. Some are rendered directly within the page's HTML, loaded from the same domain as the content, or injected by first-party JavaScript. For these, AdOff uses the cosmetic filter, the technique of hiding ad elements from the DOM via CSS, without disturbing the surrounding layout.
CSS Injection in the Isolated World
AdOff's content script operates in Chrome's ISOLATED world, a completely separate execution environment from the page's JavaScript. This means the extension can observe and modify the DOM without being detectable by the page's scripts, which have no access to the isolated world's scope and variables.
The cosmetic filter injects a CSS stylesheet that applies display: none and
visibility: hidden rules to known ad container selectors. These selectors
are carefully maintained to cover standard class names, IDs, and structural patterns
used by ad spaces across thousands of websites.
๐จ No layout shift, no empty space
A common problem with unsophisticated ad blockers is that removing an element from the DOM
causes the surrounding content to shift or reflow. AdOff's CSS rules use
display: none with !important priority and are applied before
the first browser render when possible, preventing any visible layout shift.
The space the ad would have occupied simply doesn't appear.
DOM Scanning and Dynamic Injection
Modern websites are highly dynamic, loading content after the initial HTML parse, injecting ad spaces via JavaScript, and continuously updating the DOM. AdOff's content script monitors the DOM for newly inserted elements matching ad patterns and immediately applies hiding rules, typically within a single animation frame. You'll never see an ad briefly appear and then vanish.
Video Ad Neutralization (Pro)
Most video players on streaming platforms rely on a standard ad SDK to handle pre-roll, mid-roll, and post-roll interruptions. AdOff replaces this SDK with a neutral stub that immediately tells the player "no ads to show", the video starts directly with no interruption.
This happens via two complementary mechanisms:
- Network-level redirect, requests to load the ad SDK are intercepted and redirected to a local stub file included in the extension
- Page-level injection, the stub is injected before any site script runs, so even players that bundle the SDK internally find the neutral version first
The stub implements the entire API surface of the original SDK but never serves any ads.
When the player calls start(), the stub immediately emits the "ad complete" signal, the player resumes the video as if the ad pause naturally finished.
It's universal: works on any website in the world using this SDK, with no manual
site list and zero required updates.
On major video platforms, a dedicated handler speeds up ad playback to 16x and auto-clicks the skip button with human-like timing.
Layer 3. Anti-Detection Stealth (Pro)
Pro & TrialThis is where AdOff differs most from conventional ad blockers. Many sites now run active anti-adblock scripts, code whose sole purpose is detecting whether you're using a blocker and, if so, disrupting your experience with a wall, a warning, or degraded content.
AdOff's stealth layer, running in Chrome's MAIN world, operates at the same level as the page's JavaScript. It surgically neutralizes anti-adblock detection before it can execute. Here's how each technique works:
๐ชค Bait Spoofing
Anti-adblock scripts commonly work by injecting a small "bait" element, a DOM node styled to look like an ad container, then checking if its dimensions are zero, or if it's been removed by an ad blocker. AdOff's bait spoofer preserves these elements in the DOM, reports plausible dimensions when their geometry is queried, and ensures the detection script gets the "all clear" signal it expects.
๐ฆ Variable Spoofing
Ad networks inject variables and JavaScript properties onto the
window object to signal their presence. Anti-adblock scripts check
for these variables to confirm ads were loaded. AdOff's variable spoofer reconstructs the expected global namespace, creating lightweight stub objects that pass existence checks, so
the page believes the ad scripts executed successfully, even though no actual ad content was delivered.
๐ Fetch / XHR Interception
Some detection systems don't rely on the DOM at all, they make direct
fetch() or XMLHttpRequest calls to known ad endpoints and measure
the response time or status code. If the request is blocked, it fails
immediately, betraying the blocker's presence. AdOff wraps both window.fetch
and XMLHttpRequest with proxy handlers that detect requests to
known ad domains and return synthetic responses that simulate a successful ad load.
๐ก๏ธ Script Neutralizer
Known anti-adblock scripts are identified via their URL patterns and payload signatures. When the browser tries to load one, the stealth layer intercepts execution and replaces the script logic with an inert stub that satisfies any completion callback without performing any detection work. The page's code receives a resolved promise or a no-op callback, and the detection path never runs.
๐๏ธ MutationObserver Real-Time Defense
Websites can inject new detection scripts anytime after the initial page load,
triggered by user actions, scroll depth, or timers.
AdOff's MutationObserver continuously watches for new <script> elements
added to the document. When one matches a known anti-adblock signature, the stealth layer neutralizes it before its first instruction executes. This ensures protection works even against
deferred or lazy-loaded detection systems.
How the Three Layers Work Together
Each layer is independent, if one is bypassed or inapplicable, the others continue working. But their true strength lies in how they complement each other:
- Network blocking eliminates most ad payloads before they exist in the browser, reducing the surface area for detection scripts that can only detect what's been blocked.
- Cosmetic filtering handles first-party ads and any residue that escapes the network layer, keeping the visual experience clean without leaving traces in the DOM.
- Stealth anti-detection wraps the other two layers in a cloak of invisibility, convincing the page that no blocker is present, so the anti-adblock paywall never activates.
The result is a browsing experience that is not just ad-free, it's one where websites never know you're using a blocker. No warnings, no paywall, no degraded content, no "please disable your ad blocker" overlay.
Privacy by Design
AdOff processes everything locally in your browser. There are no remote servers analyzing your browsing history, no telemetry sent back home, and no list of visited URLs ever leaves your device. The extension requires only the permissions it genuinely needs:
- declarativeNetRequest, to apply network blocking rules
- storage, to save your preferences and ad counter locally
- tabs, to display the badge count per site
- scripting, to inject cosmetic filters and stealth scripts
No catch-all "read all your data on all websites". No analytics SDK built into the extension. What happens in your browser stays in your browser.
Get Started in 3 Steps
-
Install AdOff from the Chrome Web Store or download the
.zipfile directly from adoff.app/install. Chrome will ask to confirm permissions, read and accept. - Pin the extension to your toolbar by clicking the puzzle piece icon in your Chrome bar, finding AdOff in the dropdown, and clicking the pin icon. The AdOff shield will appear permanently in your toolbar.
- Browse normally. All three layers activate automatically on every page you visit. Click the AdOff icon anytime to see how many ads and requests have been blocked, or to pause protection on a specific site.
No configuration is required for the default experience. Advanced users can explore the Options page to manage your whitelist, adjust blocking behavior per-site, or enable Pro stealth features during the free 15-day free trial.
Ready to experience the difference?
Try all three protection layers free for 15 days. No credit card required.
Install AdOff Free โ