AdBlock Detection Script Demonstration

by adblock on July 27, 2004

The AdBlock detection script will notify your users of the impact that they have on your, the website owner, by using AdBlocking software.

This page contains the AdBlock script with the test variable activated. It will always show the AdBlock message until you clear the message. This is what users who have AdBlock software will see when they view a site with the AdBlock Detection Script. Click here to return to the AdBlock Script

If you have cleared the message, click here to clear the cookie and refresh the page to see the message again.





This site is supported by advertising. Learn how AdBlock software harms webmasters.

{ 26 comments… read them below or add one }

John Boyd September 1, 2004 at 1:16 am

Thank you for your efforts on this issue.

Seems odd that your post has been up since July and yet no-one has mentioned that the spelling “recieve” is incorrect on your pop-up.

Anonymous January 3, 2005 at 4:25 pm

It claims I’m running Adblock software in both Firefox and IE. This is only true for Firefox. Perhaps it’s a bug?

Rob Davis January 20, 2005 at 11:26 pm

I noticed that the window still appears even if I have Adblock disabled when I load the page.

Anonymous March 8, 2005 at 5:32 pm

Turns on without any “ad blocking software” for myself as well.

dermeister March 19, 2005 at 3:15 pm

Thanks for the tip! I’ve added “*/adblock.js” in my adblocking software.

Anonymous March 23, 2005 at 4:01 pm

Funny, all I have to do is block adblock.js in firefox, and this doesn’t work at all…big threat this is.

A Webmaster March 29, 2005 at 6:44 am

popup happens with no adblock software turned on.
as do the various other JS that i have located.
Hopin to find one that works, yes I realize that the lowlife leeches will find a work around, but I’m more interested in the people that are honest and want to help my website continue, I may eventually put a EULA on my index page and require registration…pretty crappy thing to be forced into thinking about just because people want me to pay for their “free” internet.

I don’t believe in obtrusive ad’s or pop-ups or anything that takes control of the endusers system. But a banner ad is very reasonable, and hey would it hurt you to click on one once in awhile, I mean if you like the site, and want it to stick around then what harm is there in opening a link in a new tab or window?

Leeches(you know who you are) Go host yer own site (pay for bandwidth, servers, dev software, and pay yourself minimumn wage) then come back and complain about ad’s.

Support your local Webmasters

Anyway Rock On, thanks for a great site,

Anonymous June 6, 2005 at 12:19 pm

Thank you… I’ve added adblock.js to my adblock software.

I'm a person, not a "consumer" June 6, 2005 at 2:15 pm

This sound pretty cynical and all, but I’ve gotten to the point where I’ve turned JavaScript off entirely because of overlays (or whatever the technical term is, IANAPW (i am not a professional webmaster)) like that. I have a handy preferences bar in my browser, and when I find a site that has some javascript that I actually want/need to run, I check the little box next to ‘JavaScript’, which turns it on for that page, and when I’m done, I un-check the box. It’s a real shame that a few (well, a lot) of greedy webmasters and advertisment companies have ruined things for websurfers and website owners alike, but I’ve gotten to the point where I’m so sick of all the crap that some sites attempt to force upon me that I’m finally saying “no” to nearly every form of advertisement.

I can’t begin to tell you how many banner ads i’ve seen since I got online around 1996. I’ve gotten to the point where I simply ignored them, and so have most other people, otherwise there would not be pop-ups/unders/whatever, flash-based overlay ads, flashing advertisements, and all the rest. It would seem that advertisers have yet to gain any sort of understanding of the issues people have with some forms of advertisements, because I’ve finally gone from ignoring simple banner ads to blocking almost every single advertisement I come across. I’m fed up with all the crap that gets shoveled onto my browser window, and I’ve decided to take back my web browsing experience. In the same way that I will not tolerate a salesperson forcing their way into my home and shoving advertisements in my face, neither will I tolerate websites that attempt to force advertisements upon me (guess what? i own a replaytv, too – i watch what I want to watch, not what Mr. Turner or anybody else decides I will watch). This is MY choice that I have made. If a webmaster chooses to block me from accessing their site based on my choice, that’s fine. I’ll choose to visit another website that doesn’t have such an idiotic policy.

Advertisements are NOT the only way for a webmaster to make money. I am an HUGE fan of the PayPal Donate Button, and I have no problem at all with tossing a few dollars the webmaster’s way, as a means of thanking them for providing valuable content. Speaking of valuable content, I don’t mind a paid subscription model for certain websites. I’ve got subscriptions to Salon, NYTimes, and a subscription to Jane’s through my job (which cost my employer nearly $40,000); so if you don’t like people blocking your ads, go ahead and move over to a subscription-based model. If your website is as valuable as you think it is, you’ll have no problems offsetting the cost of running it via subscription fees. But of course, if your website is merely a platform for an attempt to make money from advertisements, I’d suggest a new line of work. The time of such businesses is rapidly running short…

Captain June 14, 2005 at 12:24 pm

Some ideas for making this adblock script even more functional and foolproof:

* Rather than including a separate JS file, just dump it on each page. The practicality of this depends on your site design and structure. On my sites, all pages have one parent file which then includes modules on each page. Thus, I can easily dump in the adblock.js to my one page and it works on the entire site

* If that isn’t an option for you, why not try randomizing the js name? You’ll need php/mysql for this, here is a basic framework:
- Setup a db table that will hold the adblock.js filename. On each page load (or every few loads, as you like) grab the adblock.js filename from the db, setup a new name (ie, an md5(time())), rename the filename to that new name and then dump that hashname into the db.

With the last method, you are changing the name constantly. It isn’t foolproof because users can still block each random filename, but it is much more hassle for them, and after awhile their adblock list will be bloated.

Captain July 15, 2005 at 12:17 pm

To those of you who’re getting the adblock detection even when you don’t have ad-block on, this is most likely because you’ve changed the name of the test image (“/banner.gif”). If you have changed the name, you must also change the occurence of “banner” in adblock.js with whatever the filename is (without extension).

Anonymous July 14, 2005 at 3:43 am

Adblock rocks.

arg January 22, 2006 at 11:00 am

A combination of Adblock and the NoScript extensions for Firefox will keep most advertisements and web-bugs at bay.

Take back the Web!

Etaoin Shrdlu August 15, 2005 at 1:23 pm

Your popup says, “Or, if you have installed AdBlocking software, . . .”

As it is used here (incorrectly, on many levels) AdBlocking is an adjective referring to and modifying the noun software; it is not a proper noun, so the b should not be capitalized.

Adblock, the extension available for Firefox, does not capitalize the b. I doubt there is any software called AdBlocking. If there is, the person who named it would be exposing himself to the world as unlettered.

In any case, the word in question is not legitimate. The three syllables in the order presented must make up two words: ad blocking. When the two precede the word software, the two words become a double modifier that requires a hyphen: ad-blocking software. Because of this, and without the hyphen, the phrase would suggest an ad that blocks software. Compare and contrast:

the ad blocking software
the ad-blocking software

Thus endeth the lesson.

blockads August 5, 2005 at 9:37 am

I think we should block such adblocking discovery scripts first ! Another chapter in the war against web ads which spoils everyone’s web experience and wastes bandwidth, so that some webmasters can make money !

=========================================
= Say NO to web ads ! Reclaim your web! =
= You have the right to block ads ! =
===============blockads@gmail.com==============

Post comments to :
blockads@gmail.com

Use firefox http://www.mozilla.org/support/firefox/adblock

Anonymous August 5, 2005 at 11:08 am

I don’t mind a few ads, but what is really ridiculous are those ones that pretend to be Windows error messages(they look especially stupid on my iMac running Linux), and the ones offering a “free” ipod, which ends up being not free at all, but just a way to sucker you into signing up for rip-off credit card deals. And I don’t like the idea of my web-browsing habits being tracked and the information sold to marketers.

So I use “Mike’s Ad-Blocking Hosts File” and Firefox’s Ad Block extension, and bugmenot.com for anything which asks me to register, and dodgeit.com for anything which demands an e-mail address.

Now if I could just get a list to block all of those goddamned fake results sites that are dynamically generated when I do a web search.

Anonymous September 15, 2005 at 7:53 am

In my opinion, if you need hundreds of ads on your site, then you probably shoudn’t run it to begin with. Without “AdBlocking Software”, I find the web to be unbearable.

Sure, I can see how webmasters could be annoyed by people not looking at the adverisements, but the truth is that some of these ads, when clicked, will install crudware onto the computer, which doesn’t help anyone but hackers and the adverisement company.

There must be better ways to fund a website than advetising.

Jack_of_ads September 30, 2005 at 2:46 pm

This is actaully better than disabling the entire site if an advertisment has been block, great work on imforming the user. but since alot of sites use advertisements that are threatening my privacy and are distrating, I’m still going to block ads anyway until times change. what happend to simple homesite based ads or “pure” text ads?

Jack_of_ads September 30, 2005 at 2:51 pm

oh wait.. you said the bait was banner.gif? I didn’t even block banner and still got the warning.. Couldn’t you use something less generic but more specific like “doubleclick_ads_click.gif” for the bait.

zachary wilson October 8, 2005 at 5:55 am
Ritter February 17, 2006 at 3:12 pm

This code sample doesn’t work,.. banner.gif (the bait) does not get blocked, however the script detects that it does. This false alarm doesn’t prove functional for a production site trying to reclaim its advertising viewership.

Syron April 28, 2006 at 9:10 pm

You’re free to set up your websites however you want, but once code gets to my end, I’ll display it however I want. I block intrusive ads like doubleclick, but I choose to allow stuff like googlesyndication. If your ads are like the ones on this website, I’ll see them. If you or they annoy me, then I block them. I also don’t use filter sets, so if I’m browsing random websites for information, I’m more likely to see ads.

Tassoman May 19, 2006 at 4:49 am

Your script doesn’t work on firefox throws thats errors:

Errore: syntax error
File sorgente: http://www.adblock.org/2004/07/adblock_detection_demo/
Riga: 86
Codice sorgente:

Errore: AdBlockTest is not defined
File sorgente: http://www.adblock.org/adblock.js
Riga: 59

Anonymous November 23, 2006 at 1:38 pm

This isn’t a test page. With the test variable set to always display the message, it’s impossible to tell if it’s really detecting adblocking software. At this point, it’s more a “javascript enabled” detector.

Will July 28, 2010 at 5:41 am

I have devised a script snippet that will work perfectly

Just put this inside the DIV / Wrapper of your adds below the add-call script and adjust the css/message to suit yourself

[code]

Please disable your adblocker and support our site

var div = document.getElementById('topbanner');
if(div.getElementsByTagName('IFRAME')[0] == null){
document.getElementById('blockedalt').style.display = "block";
}
[/code]

Will July 28, 2010 at 5:51 am

Sorry, here is a htmlentities encoded version of the snippet

<div id="blockedalt" style="display:none; height:90px; width:728px; background:white;">
<p style="padding:10px; font-weight:bold">Please disable your adblocker and support our site</p></div>

<script>
var div = document.getElementById(‘topbanner’);
if(div.getElementsByTagName(‘IFRAME’)[0] == null){
document.getElementById(‘blockedalt’).style.display = "block";
}
</script>

Leave a Comment

{ 1 trackback }

Previous post:

Next post: