How an anti ad-blocker works: Reverse-engineering BlockAdBlock (15 minute read)
BlockAdBlock is a script that detects ad-blockers and disables website access until the ad-blocker is disabled. By searching through its version history using the Wayback Machine, it is possible to figure out how it was developed and how it works. BlockAdBlock's basic architecture consisted of a bait, a check to see if the ad-blocker blocked the bait, and then a function that created the overlay. Improvements in the code implemented different strategies of detecting ads, such as checking the page to see if target ads had loaded. As BlockAdBlock improved, ad-blockers also improved, creating a need for BlockAdBlock to be more creative in its methods. In the end, it is much harder to block ad-blockers than it is to block ads due to how web technologies work.