Making IE8’s InPrivate Filtering sticky

by Matt 14. April 2009 15:11

Last time, we saw that you can use IE8’s interesting InPrivate Filtering feature as a slightly heavy handed ad blocker.

It’s off by default, which is fair enough, but it’s rather surprising that once you do turn it on, it’s only on for the duration of that session, and resets itself to off for the next time you launch IE.

Fortunately, there’s a registry setting. Add a new DWORD value called “StartMode” to HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Safety\PrivacIE. Setting to 0 means off at startup, 1 means set to “automatically block” and 2 is set to “choose content”.

If you’ve imported an xml file that claims to be a port of one of the adblock plus lists, you’ll want to set it to 2. If you set it to automatically block, it’ll block based on the number of times a script or image has been shared – which is probably not enough control.

Tags: , ,

IE8’s poor man’s adblock

by Matt 6. April 2009 18:56

One of the more interesting-but-you’ll-never-use-it features of IE8 was the InPrivate Filtering mode – not to be confused with the tracks covering features of InPrivate Browsing.

It’s billed as a privacy guard – it can automatically block content that is being used from multiple sites. So if a script or image is included on more than 10 sites it’ll get blocked. At least, theoretically. It’s off by default (I guess not downloading shared scripts could have too much of an adverse affect on the web)

 image

This is one of those forehead slapping moments. What services dish out images or scripts that people are worried include behaviour tracking cookies that a privacy guard such as this might want to block?

Yep. Adverts.

IE is smart enough to keep a track and automatically track items that are used by more than 10 sites, but the advanced settings let you import a whole bunch from an xml file. You know, like a black list of advertising content.

neowin has an article explaining how to do this, with a link to a forum post with such a black list. And it works reasonably well. It’s not as good as AdBlock for Firefox, but it’s better than nothing.

It’s not that different to the other solutions employed to get ad blocking into IE. It’s perhaps a little less heavy handed than a hosts file, blocking actual content rather than whole sites. It will have pretty much the same impact as a proxy pac file, but without the hassle of also running a black hole proxy. And I suspect it’s not going to be as good as something like Ad Muncher or Privoxy, that (as far as I can tell) are rewriting proxies that will strip offending images out of the pages before they get to the browser. (And I don’t know what IE7Pro does. I’m too scared of it to install it. No add on should implement that many features)

No matter what, it’s nice that it’s in the box.

But it could have been nicer.

Looking at the rules xml file, you’ll notice that it’s actually an RSS feed, with a single element that contains all the rules. RSS = subscriptions. So one quick Google later, and I find window.external.AddInPrivateSubscription(URL, filterName).

Perfect! Gears start turning – a web page that calls this script API to set up a subscription to a web service which gets the latest AdBlock Plus filter, converts the black and white list sections to xml and serve the latest files – an always up to date simple ad blocking filter for IE.

The only downside is that this is beta documentation and the method is missing in action in the RTM. How disappointing.

(Of course, the real power that AdBlock Plus has is in the CSS matching and element hiding. That really makes the ads invisible. I don’t know how to port these. Perhaps they could get edited into a user style sheet? Hardly the one-click solution any more, though)

So, there we have it. With the initial design for supporting subscriptions, the IE devs must have had ad-blocking as an unspoken design goal for this feature. But they’ve pulled a Microsoft and implemented something that has some really interesting potential, but just falls short, isn’t very easy to find, and is turned off anyway.

Tags: ,

Rel=Me

Month List

RecentComments

Comment RSS