Skip to content

Detecting AdBlock with jQuery or JavaScript

Recently a large number of users use browser extensions that block advertising, the most known is AdBlock Plus. If our website is financed thanks to the publicity this can be a problem. In this case we can use JavaScript to detect if AdBlock or another similar plugin is blocking our advertising.

A cunning may be placing the script of advertising within a div and check if your height is greater to 0.






Another cunning can be check for iframes since ads like AdSense use them.




Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0Email this to someone

Programmer and systems analyst since 2006. Graduate in Software Engineering in Marseille +10 years of experience in Web Technologies. Currently VueJS & Symfony.