News for hackers. Stuff that matters.
Re:An approach to fair ad blocking by axod on Monday May 11, 2009 @05:28PM (#604359)
It's quite simple to detect and block only adblock users if you wish. It's about 6% of firefox users on my webapp. Or you could show them "Donate here if you're not prepared to see my ads" links everywhere.
Re:An approach to fair ad blocking by Ardit20 on Monday May 11, 2009 @05:44PM (#604394)
How do you do so? I am not a programmer although have some experience of it, just a curious guy who happened to stubble upon this place with people which seem at least able to share a love for umm 'thinking' :P . I do not plan to implement a blocking of them guys, as I said fair to them, they have the knowledge and are not quite a threatening statistics. I'll save the time load for this thing I am trying to figure out of how to automate the change of the most viewed articles.
Re:An approach to fair ad blocking by axod on Monday May 11, 2009 @06:07PM (#604437)
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.

Re:An approach to fair ad blocking by dsingleton on Monday May 11, 2009 @06:21PM (#604457)
There was some discussion on Reddit recently about ABP usage figures (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?

Re:An approach to fair ad blocking by axod on Monday May 11, 2009 @06:33PM (#604473)
Pretty tech savvy yup. Like 75% of so firefox users.
Re:An approach to fair ad blocking by dsingleton on Monday May 11, 2009 @06:17PM (#604450)
I actually was looking at this recently. There used to be some foolproof ways to identify ABP, but they removed them - as a bug fix IIRC. They definitely don't want to be identifiably.

But there are a few heuristic methods, basically just loading an image from a blocked domain (it's a sure thing double click will be blocked), waiting, then checking the DOM to see if the element has been removed. Not fool proof, or specific to AdBlock but good enough.

I have a couple of detection demos (including flash block) here:

http://dsingleton.co.uk/code/firefox-plugin-test-suite/