3 ms·
Simple method would be to try and load content from often blocked domains and see if it loads properly or not using js. I did this a while ago and measured the
by axod 18y ago
Simple method would be to try and load content from often blocked domains and see if it loads properly or not using js. I did this a while ago and measured the 6% firefox users using adblock.
For example:
// cb = function to call with result
function detectAdblock(cb) {
var tt = document.createElement("div");
tt.style.display = "none";
document.body.appendChild(tt);
var i = document.createElement("iframe");
i.src = "http://adv.foo.com/ads/-adspace?ad_id=&affiliate=&advert=678";
var foo = i.style.cssText;
tt.appendChild(i);
window.setTimeout(function() {
cb(foo!=i.style.cssText);
}, 200);
}
This works because adblock is pretty primitive and just checks for keywords in the iframe src, and if there sets the visibility or display css style etc.
To get around adblock, you can proxy through your own domain, and stay clear of showing the ads in iframe/image/flash. Use js to put them in with everything else as text links which perform far better than any other type of advertising anyway.
- dsingleton 18y agoThere was some discussion on Reddit recently about ABP usage figures (http://www.reddit.com/r/programming/comments/8j4c7/we_created_a_plugin_for_jquery_jplayer_that/c09gqbb http://www.reddit.com/r/programming/comments/8j4c7/we_create...). My rough estimations came out at 6% of FF users having ABP installed, sounds like that was about right. Out of curiosity, what kind of audience does your site have? Particularly tech savvy?
- axod 18y agoPretty tech savvy yup. Like 75% of so firefox users.