Ad Blocking for Speed: How CtrlBlock Improves Page Load Time
tl;dr
I’ve tested 6,911 pages and using CtrlBlock improves the average page load time by more than 50% from 5.0s to 2.1s.
Introduction
A faster web makes for a more enjoyable experience.
A website is made up of a main HTML document and a number of additional assets like CSS, JavaScript or images. How fast a website loads depends on the size and complexity of it and it’s assets and the number of assets it uses.
The purpose of an ad blocker is to remove annoying parts of a website (usually an ad). One of the ways it does that is by preventing the browser from downloading assets that belong to or make up such an annoying part of the website.
Each asset not loaded reduces the time spent by the browser downloading and processing assets and should reduce the overall page load time. Therefore ad blocking should, in principle, lead to a reduction in page load time.
So does ad blocking improve page load times? If yes, by how much?
Methodology
Determining whether using an ad blocker improves page load speed is relatively simple: We open the page with and without an ad blocker installed and compare how long it took to load.
In order to measure the page load time we first have to establish when a page load should be considered done. From a Users perspective a page is considered loaded when the page and all of it’s assets have been downloaded and rendered by the browser and the page is ready to be used.
However, this is not trivial to determine programatically since neither the size of the website nor the number of assets are known. Which assets to load is dynamically determined at runtime. Loading one asset can lead to multiple additional assets being loaded, and differs based on device, browser, language, location and other factors. For a modern website, especially one heavy with ads, individual page loads are often unique as which ads to load is determined in real-time on a per visitor basis.
Browsers provide the ability to trigger actions at a number of different phases in a page load lifecycle (e.g. Window:load, DOMContentLoaded, etc.). However none of those coincide with the definition above.
Instead we observe a page’s network activity. When the page has stopped loading any additional assets for long enough we assume it’s done and ready to be used.
Some websites never stop their activity for long enough or are simply very slow. In this case we timeout after 10 seconds. If a timeout occurs the result is disregarded for this test.
Finally we need a set of pages to test. In order to obtain a relevant set of pages (that is pages that use ads) I’ve extracted the URLs of pages targeted by EasyList, arguable the most popular filter list used by virtually all ad blockers.
Normally ad blocking filters target the url of the ad not the page the ad is shown on but EasyList contains a sizeable number of hiding filters that are only active on a specific url. Those urls should give a meaningful data set to test, since those pages will most likely contain ads and the EasyList maintainers found them worthwhile to add, meaning at least a handful of users did perceive the ads on those pages as annoying.
Testing was conducted three times in a row within the span of 24h using the following environment: CtrlBlock v0.4.3; Chrome v126; Puppeteer 22.10.0; AWS Fargate 2 vCPU 4GB us-east-1.
Results
Perhaps unsurprisingly the test showed that page load speed is significantly faster when using CtrlBlock.
After repeating the test three times, we got 6,911 usable results.
The average page load time improved from 5.0s to 2.1s
Without CtrlBlock less than half of the pages managed to load within 2 seconds
With CtrlBlock two thirds manage to load within 2 seconds or less
Using CtrlBlock we see improvement across the board, in particular for the slowest cohorts
Conclusion
Using CtrlBlock more than halves the average page load time. If you do care about a fast web and you’re not currently using an ad blocker you definitely should give it a try. Of course I would recommend: CtrlBlock but you should get a similar performance boost using any of the popular adblockers.