Actually, there's no way to really block ad-block.
It wouldn't be too hard to make an ad-blocker that used CSS and Javascript to do all of the blocking during page render. It'd be an inefficient use of bandwidth and rendering time, but it'd be able to block 100% of ads and undetectable from the web server.
In fact, before Opera had a built-in ad-blocker, I think there was an ad-block extension built on its "User Javascript" and custom CSS abilities.
(function() {
// local scope, can't override
})();
My point is that I agree with grandparent, that they just allow ads to be shown, and it's not technically impossible to reload ads, or prevent page contents view, if no ads visible.
only because sites generally don't do so; if necessary, extensions could get much more aggressive with website scripts, current user script limitations aside.
If it's client-side, it can be defeated. Let's not enter into an arms race of larger and more bandwidth-intensive checkers/blockers to try to get the upper hand. If someone ad blocks, they're not likely in your target demographic anyway.
Render the page, identify the regions of the resulting bitmap which are ads, and blank them out. The browser can always just lie at the end, even after running all of the JavaScript and marking all of the DOM elements to visible.
I use http://someonewhocares.org/hosts/ as my hosts file, and it works great. It doesn't remove the placeholder for the ad, but it does stop it from downloading.
It wouldn't be too hard to make an ad-blocker that used CSS and Javascript to do all of the blocking during page render. It'd be an inefficient use of bandwidth and rendering time, but it'd be able to block 100% of ads and undetectable from the web server.
In fact, before Opera had a built-in ad-blocker, I think there was an ad-block extension built on its "User Javascript" and custom CSS abilities.