Adblock Versus Facebook - Programming Wars Made Real
Saturday, 13 August 2016

Adblockers are either the savior or the nemesis of the web depending on what side of the fence you are on. But who could resist the spectacle of Facebook taking on Adblock Plus.


You can't get away from the fact that Facebook exists to make money and only exists while it does. So far its only way of making money has been to show its users adverts. Some of its users don't like adverts and think it's perfectly reasonable to use an adblocker to see the content without ads. Facebook cannot afford to allow adblockers to gain the upper hand and so it has declared war - a war of escalation.

Most anti-adblockers work on simply detecting the addin and either posting a request to be white listed or denying the user access to the content. Facebook is trying something very different. It is attempting to circumvent the adblocker and show the ads that would have been blocked. This is a much more difficult proposition but clearly not impossible.

On Tuesday of last week Facebook announced that it was about to use an adblocker-proof format. On Thursday Adblock Plus had found a way round the defence. On Friday Facebook had a counter-counter-measure, or should that be counter-counter-counter measure as Adblock Plus could already be classed as a counter measure? Later that afternoon Adblock Plus had a counter^4- measure and just a little while afterwards Facebook had a counter^5 measure. By now the n in counter^n measure will probably  have incremented with the winning side being decided by n being odd (Facebook) or n being even (Adblock Plus). 


At this point we could try to workout who the evil party is and who the righteous side is - but why bother when there are technical matters to keep us amused. 

Ad blockers generally work by detecting downloads from known ad servers. This is easy blocking. Facebook doesn't use ad servers and the origin of the material means that to ad-block Facebook you have to work on algorithms that detect ads by their content. However, to comply with advertising standards, Facebook has to make its ads obvious to a user and this means that an ad-block algorithm doesn't have as hard a task as it might if the ads could be completely blended in with the rest of the content. 

The fact that an ad-blocker has to be updated, often manually, also tilts the balance towards Facebook. It can just roll out a modified web page which is served to all of its users, whereas the new counter measure has to be downloaded by ad-blocker users to block the new format. 

So we can sit back and watch the battle unfold. 

However there is a deeper question. 

Is this game winnable?

Any two-person game, and this is a two-person game, has rules and from the rules it is sometimes possible to work out who wins if a perfect game is played. For example, the player who goes first in tic-tac-toe always either wins or at worst draws. So do the rules of this game make an eventual winner inevitable or is it just a matter of keeping on thinking of new ways around the current counter measure?

You might say at this point that the rules of the game are too complicated, but the question can be boiled down to something simpler.

Is it possible for a web page to always "know" if it has been tampered with?

This is a problem I have been thinking about for some time in a different context, but it is essentially the same problem as detecting the removal of content. Sometimes I think I've got it, and it usually involves a digital signature of some sort, and then I see a way to circumvent the method and I'm back to square one. Perhaps it isn't necessary to get a solution that is 100% effective, perhaps defeating it would take too long or degrade the user experience in some way. 

So is it possible to always detect that a web page has been altered? And remember an add-in can modify the way a browser works in all sorts of ways. 


More Information

A New Way to Control the Ads You See on Facebook, and an Update on Ad Blocking

Related Articles

 A Real World Ad Blocker 

Dr Dobb's Bites The Dust After 38 Years 

Adblocking - Looking For A Solution

Rationality, advertising and profit

A web site for $5 a month?


To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on, Twitter, FacebookGoogle+ or Linkedin



Apache Shiro 2.0 Released

Apache Shiro 2.0 has been released. The Java security framework now requires at least Java 11, and has added support for Jakarta EE 10.

Redis Changes License, Rival Fork Launched

The developers of Redis have announced that they are changing the licensing model for the database. From now on, all future versions of Redis will be released with source-available licenses rather tha [ ... ]

More News


raspberry pi books



or email your comment to:


Last Updated ( Saturday, 13 August 2016 )