Ad Blocker Detection Example

This page accompanies the “Basic Ad Blocker Detection” chapter of the Ad Blocking Survival Guide book. The page contains JavaScript code from the book designed to detect the presence of an active ad blocker. Output is displayed within the JavaScript console indicating whether an ad blocker has been detected.

Instructions

Display the JavaScript console for your browser and try reloading this page with an ad blocker enabled and then again when it is disabled.