Working towards Adblock Plus for Internet Explorer · 2013-06-19 15:34 by Wladimir Palant

Remember this blog post of mine six years ago? Probably not. But you will certainly be happy to know that I was right: creating a usable ad blocker for Internet Explorer means tons of work. However, the goals of the Adblock Plus project got more ambitious since that post has been written. In order to change the web we need to provide all users with the option to run an ad blocker. This means that we could no longer ignore Internet Explorer and so a few months ago we started working on an Adblock Plus port to Internet Explorer.

The important news first: this work progressed to a point where we can give you development builds that are even usable to some extent — and compatible to Internet Explorer 6! In our tests it worked quite reliably and is a vast improvement over Internet Explorer’s tracking protection lists that are limited to say the least. In particular, Adblock Plus for Internet Explorer has much better support of our blocking rules (e.g. YouTube ads can be blocked) and also provides element hiding functionality. There is still room for improvement of course:

You will have to choose a different installation package depending on whether you are running 64 bit Windows or not. The goal is to have a single installer of course that will choose the installation package automatically but we don’t have it working correctly yet.

The development builds will update automatically but the update experience is far from being great. The user interface is suboptimal and chances are that the updater will ask you to restart Windows — sorry about that. Our primary goal was to make this work at all (which proved surprisingly difficult) and we will improve later.

The AdblockPlusEngine.exe process starts automatically when you start up Internet Explorer with Adblock Plus. However, it won’t shut down when the last Internet Explorer window is closed. Fixing this is on our TODO list.

process starts automatically when you start up Internet Explorer with Adblock Plus. However, it won’t shut down when the last Internet Explorer window is closed. Fixing this is on our list. The ABP icon shows up in the status bar of Internet Explorer. However, the status bar is hidden by default in newer Internet Explorer versions so this isn’t a great location. Of course, displaying a hint explaining how to enable the status bar isn’t a solution — we are still looking for a proper solution here.

icon shows up in the status bar of Internet Explorer. However, the status bar is hidden by default in newer Internet Explorer versions so this isn’t a great location. Of course, displaying a hint explaining how to enable the status bar isn’t a solution — we are still looking for a proper solution here. Currently the ABP icon doesn’t do anything beyond showing the Adblock Plus preferences. It should show a menu instead that will at least allow disabling Adblock Plus on a website without going to preferences.

icon doesn’t do anything beyond showing the Adblock Plus preferences. It should show a menu instead that will at least allow disabling Adblock Plus on a website without going to preferences. There is no first-run page to indicate that Adblock Plus was installed correctly — this is work in progress.

The processing of blocking rules and especially the element hiding rules is sometimes different from Firefox and Chrome. We are working on some of the issues, others will unfortunately be unavoidable however.

We are still working on the performance of our solution, right now there are some issues like Internet Explorer startup being delayed by Adblock Plus (fortunately this is a one-time thing).

Metro mode Internet Explorer in Windows 8 and Internet Explorer in Windows RT are locked down environments that don’t allow any third-party code to run — including Adblock Plus. So we unfortunately cannot support these environments at the moment.

Enhanced Protected Mode of Internet Explorer 10 isn’t supported at the moment.

If you notice other issues, there is an Adblock Plus for Internet Explorer forum for this now.

As to the technical side of it: the idea was not to develop a completely new extension but rather reuse as much as possible from other Adblock Plus extensions. The first challenge here was the JavaScript engine of Internet Explorer which is slower than modern JavaScript engines even in Internet Explorer 10 and completely unusable in Internet Explorer 6. We decided to go with the approach that has already proven useful in Adblock Plus for Android: we use V8 (Chrome’s JavaScript engine) to run shared Adblock Plus code. We’ve even built a general-purpose library around it called libadblockplus, the same library will hopefully soon be used in Adblock Plus for Android.

The other challenge was the multi-process architecture of Internet Explorer. With EasyList getting close to 40,000 filters we didn’t want to load all these filters in each Internet Explorer process. Instead, the first Internet Explorer window opened spawns a new process called AdblockPlusEngine.exe that is where most of our code lives (in particular the JavaScript engine). The individual Internet Explorer processes communicate with our engine when they need to make a decision, this is very similar to how things work in Google Chrome.

The user interface for our extension is yet another challenge. We have to use HTML for things like preferences or the first-run page. Not only is it very tedious to create HTML code that’s compatible with Internet Explorer 6, the JavaScript code in there needs to communicate with the Adblock Plus engine. The approach here is essentially to inject an ActiveX object into these pages that will forward calls to the engine (in a different process) — funny setup.

Altogether however this slowly starts looking like a product that we can release to the general public and not just to a handful of brave development build users. If you would like to contribute, the relevant source code repositories are adblockplusie and libadblockplus (yes, documentation needs to improve). Better yet, if you like working on complex problems such as this — feel free to apply for a job at Eyeo.

Commenting is closed for this article.