How to stop adblock plus blocking images in HTML page

I’m assuming that you’re not talking about Adsense here but images hosted on your server and hard coded into your page. If so they’re probably being blocked because of the file name and/or path. Adblock will block images with common ad dimensions in the file name, e.g. ‘myimage_720_90.png’ or ‘myimage_300x250.jpg’. with common ad keywords in … Read more

Ad Blocker detection AKA Adblock Plus

You don’t need to have a plugin to detect adblock, simply use this: <script type=”text/javascript”> var adblock = true; </script> <script type=”text/javascript” src=”https://stackoverflow.com/questions/18180598/adframe.js”></script> <script type=”text/javascript”> if(adblock) { //adblock is installed and enabled on this site 😀 } </script> Content of adframe.js: adblock = false; Update: Adblock Plus blocks certain requests or hides certain elements based … Read more

inject.preload.js failing to load a file in chrome from my dev environment

Looks like it is officially broken. The issue is ticketed at https://issues.adblockplus.org/ticket/6744 I tried to debug and find the exact cause, but the issue seems to be elsewhere. The JS code debugged (inject.preload.js at line 373) document.documentElement.appendChild(script); // here, script.src is indeed a valid script document.documentElement.removeChild(script); URL.revokeObjectURL(url); The script‘s src attribute targets a valid blob … Read more

How to detect Adblock on my website?

My solution is not specific to a certain ad network and is very lightweight. I’ve been running it in production for a few years. AdBlock blocks all URLs containing the word “ads” or “prebid”. So this is what I did: I added a small js file to my webroot with the name prebid-ads.js This is … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)