Forum Moderators: not2easy

Message Too Old, No Replies

Ad blockers watch selectors, too :-(

         

csdude55

8:35 pm on Feb 15, 2020 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



This may be common knowledge, but I didn't know it until today... apparently ad blockers look at CSS selectors, too :-( So where I had an element named .ad_alternative to show local content when a banner was blocked, that class name was causing it to be blocked, too!

It literally took about 3 hours of moving things around before I figured it out... changing the class name to simply .alternative fixed it.

So I'm posting this in the hope of helping someone else not waste 3 hours. As far as I can tell you can't use any of these in the selector name, but of course this isn't all-inclusive:

ad
banner
dart
dfp
doubleclick
preroll
google
mpu
sponsor
openx

lammert

8:45 pm on Feb 15, 2020 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Oops! Thanks for the heads-up! I use google... quite a lot in my CSS for styles specific for Google AdSense parts of the sites. It may be time to check how my sites look through an ad blocker.

csdude55

8:56 pm on Feb 15, 2020 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



This is the one I specifically tested with, but I really need to download all of the ones I can find for more testing :'-(

[getadblock.com...]