Ask HN: How hard would it be to build js script that detects ad blocking
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.