Search code examples
google-chromegoogle-chrome-extensionadblock

How does Adblock Plus really work in Chrome?


I noticed Adblock Plus injecting some CSS that hides the advertisements, but I think that it does more than that - for example blocking HTTP requests.

How does Adblock Plus block advertisements on the web?


Solution

  • They give a brief idea of it here: http://chromeadblock.org/extensions/adblock-for-chrome/

    However no real details. I think what they do is, to check css class and id's for badwords, like: advert, ad, sponsored .... Furthermore, they'll have a list of major Ad Servers like AdWords etc. and simply block those IP's / domains from being loaded. Afterwards it seems like it calculates the dimensions of the removed ad and fills it up with a blank CSS.

    Maybe thats not how they do it, but that is how I would do it.