Privoxy filters for experts-exchange.com and Google left navigation bar

Privoxy filter rules for removing all experts-exchange.com related results from Google search as well as collapsing Google left navigation bar are provided.

Intro

There are some well-known ways to improve/customize HTML pages displaying behavior in browsers, such as using scripts from userscripts.org or using browser-specific plugins/extensions. However, all these approaches typically share one common flaw: they require installation for every browser on every computer you use. The alternative approach is to perform filtering/customization at centrally-hosted HTTP proxy, and Privoxy currently seems to be one of the most viable solutions to that problem.

In the following sections I describe some simple filtering rules which I developed for myself and find useful.

experts-exchange.com search results removal

When using Google to search answers to technical questions it’s almost guaranteed you see the link to experts-exchange.com sooner or later. If that doesn’t annoy you - skip to the end of this section

For those who ARE annoyed, like me, by accidentally clicking on these links only to end up on a huge page littered with garbage - just use experts-exchange filter.

And yes, I KNOW about possible ways to circumvent experts-exchange.com “protection” of their answers (like using Google cached version, faking user agent, scrolling to the end of the page, etc) - I do not want to mess with any of these though, I just want to stop experts-exchange.com spamming my search results - which is what this filter does pretty well

Making Google left navigation bar collapsible

If you’re not annoyed by left navigation bar in Google search results - skip to the end of this section

Just removing that nagivation bar is very easy: use google-remove-navigation filter.

However, as I still have to use it sometimes, I’d like to have the ability to make it appear when I need that, so I put (slightly improved) code from Google: Hide/Show left column bar w/ toggle extension to the privoxy filter to provide collapsible left navigation bar, it’s google-collapsible-navigation filter.

I prefer to use it together with google-remove-navigation filter so that page does not flicker on loading.

Filters installation

  1. Certainly you need Privoxy up and running to continue Understanding configurations files format is also a plus.
  2. If you use more or less recent Chrome browser, chances are it uses SDCH content compression when talking to google.com, which doesn’t seem to be understood by Privoxy version I currently use (3.0.15). This means that Privoxy may not be able to filter content, or even may break the content resulting in garbage output. There are several options to fix that:
    • Pass command-line option to Chrome: smth like -enable-sdch=nothing should do it. This shares the same problem described in Intro section - i.e. it has to be done on every computer you use.
    • Strip SDCH content encoding header in client request using Privoxy. This is the approach I currently use, the appropriate filter is disable-sdch. This solution has one side benefit that it should take care of any client requesting SDCH compression - currently I do not know of any other programs using SDCH besides Chrome, but that may change in the future.
    • Develop patch for Privoxy to handle SDCH This is going to be non-trivial task as you will need to store content between sessions, effectively turning Privoxy to stateful filter.
  3. There are two files attached: user.filter and user.action. user.filter contains filters themselves while user.action specifies conditions when these filters should be applied. If you do not have any custom entries in your user.filter and user.action Privoxy configuration files - you can just overwrite them with my files, otherwise insert their content in your files. To apply filters selectively remove appropriate parts in user.action file.

Random thoughts

Privoxy doesn’t make it really easy to perform complex modifications:

  1. The only way to match the text to modify is using regular expressions. That is fine for small/simple modifications, but as soon as you want anything more or less complex - the approach taken by WebCleaner which claims to fully parse HTML content and thus allow filtering on structured basis seems to be more appealing. It’s a pity the project seems to be abandoned though.
  2. Inserting more than several lines of text isn’t also easily done in Privoxy as it seems you cannot reference external text file, so the text has to be inserted to filter file and escaped to be understood properly by Privoxy.
  3. Privoxy doesn’t seem to have easy-to-use debugging facilities to understand details of filters application: it’s logging provides bare minimum of useful information, but the process is quite burdensome.

Comment viewing options

ndl@home is currently in maintenance. During this maintenance it is not possible to change site content (like comments, pages and users).
Select your preferred way to display the comments and click "Save settings" to activate your changes.

You can also block domains directly through Google

New feature released this year, first as a Chrome extension but then as a feature on the main search engine. It ties to your account so it will be true across computers as well.
http://googleblog.blogspot.com/2011/03/hide-sites-to-find-more-of-what-y...

Thanks!

NDL's picture

Didn’t know about that, thanks! Especially relevant for me as right now I’m not using my proxy anymore (yet  )

Post new comment

ndl@home is currently in maintenance. During this maintenance it is not possible to change site content (like comments, pages and users).
Syndicate content

User login