
Ask HN: How hard would it be to build js script that detects ad blocking - padseeker
Here&#x27;s my question - Is it possible or realistic for content providers to add javascript to their own site to detect if ads are being blocked, and if so then block the user from seeing the content. Or making it extremely difficult.<p>Explanation - There have been a lot of stories talking about ad blockers for mobile devices. On one hand nearly all of us hate ads in our content AND it consumes data on our devices.<p>However I actually work for a traditional publishing media company, one that is seeing declining revenue from print and is increased use of web-based content, which means less money per viewer.<p>Most content providers have some sort of barrier, even if it is just for registration without paid subscription. Ads are used to make up for revenue lost of giving the content away for free by using advertising.<p>I realize that this would be easy to circumnavigate on a laptop, probably with just a firefox&#x2F;chrome plugin. However that is not so easy on a mobile device.<p>I don&#x27;t even know if this is a good idea, but I&#x27;m sympathetic to someone like Marco Arment. If you produce content in the hopes of making money and you don&#x27;t want to charge your only realistic option is ads.
======
seren
I have already encountered website blocking content if an adblocker is
enabled.

A very quick google search should have shown you :
[https://github.com/sitexw/FuckAdBlock](https://github.com/sitexw/FuckAdBlock)

However, most of the time, I am reading some news, or blogs, if the content is
blocked, I just close the site and move on, I don't even bother whitelisting
the site. So I am not sure that apart from making a statement it is efficient.
It would somewhat work if you had really good and exclusive content.

~~~
padseeker
thanks I should have thought to google adblock detector

------
timbowhite
There are a number of scripts out there that detect adblock, for instance:

[https://github.com/sitexw/FuckAdBlock](https://github.com/sitexw/FuckAdBlock)

Then it's just a matter of using some basic JS to hide content, show a notice,
etc.

~~~
padseeker
thanks I should have thought to google adblock detector

------
omginternets
>If you produce content in the hopes of making money and you don't want to
charge your only realistic option is ads.

Which means you should be focusing on making ads that people want to consume.
Blocking adblockers rarely goes over well with users; few people are willing
to fiddle with their adblock settings for your (easily replaceable) content.

~~~
padseeker
I think it's a little delusional to believe that if you just serve up the
right ads people will tolerate it. There are plenty of people whose attitude
is "no ads", end of story.

Also you can't get better ads without learning more about each user. In other
words profiling, which no one likes either.

~~~
omginternets
>I think it's a little delusional to believe that if you just serve up the
right ads people will tolerate it.

I get your point, but I think it's symptomatic of the rigidity with which we
think about ads. I'm talking more about subtle product-placement than iFrames
with promotional content. Things like "sponsorships", especially when discrete
and upfront, tend to go over much better than ads.

>here are plenty of people whose attitude is "no ads", end of story.

And that's precisely why I think I'm right.

>Also you can't get better ads without learning more about each user. In other
words profiling, which no one likes either.

True, but pragmatically speaking, there aren't any (effective) profiling-
blockers. User profiling isn't exactly a _nuisance_ either, insofar as it
doesn't degrade the usability of a service.

Going after adblockers strikes me as fighting the symtoms, rather than the
cause, and irritating the bulk of one's clients in the process.

Either way, your problem is that your content is replaceable and people don't
want ads. How is blocking users an effective remedy?

