Friday, August 7, 2009

Blocking ads in Google Chrome or any other browser

Currently there is no Adblock Plus equivalent for Google Chrome. One way to block ads is to use a proxy server. An excellent proxy server that targets internet ads is Privoxy.

What is Privoxy ? 

"Privoxy is a non-caching web proxy with advanced filtering capabilities for enhancing privacy, modifying web page data and HTTP headers, controlling access, and removing ads and other obnoxious Internet junk. Privoxy has a flexible configuration and can be customized to suit individual needs and tastes. It has application for both stand-alone systems and multi-user networks."

Step 1: Install Privoxy

In the gnome-terminal enter the following command:
sudo apt-get install privoxy

Step 2: Configure Chrome

Click on the Wrench icon in Chrome in the upper right corner.Choose options, Under The Hood, Change proxy settings. Check off "Proxy settings" and in the address setting add 127.0.0.1 and in the port 8118 Click "Ok", close Chrome and restart it.



Step 3: Verify Privoxy is running

You should not have to reboot to get Privoxy running after installing. You can look in the task manager to see if it is executing or you can point your browser to http://config.privoxy.org/

Step 4 (Optional): Configure Privoxy

You can make changes to Privoxy's configuration by editing /etc/privoxy/config. I like to use Gnome-Do and to edit the config file with gedit type in the following:
gksudo gedit /etc/privoxy/config.



If you made changes to the configuration file and don't want to restart for the changes to take effect, you can restart Privoxy by using the following command in either Gnome-Do or Alt-F2:
gksudo /etc/init.d/privoxy restart

Notes:
  • This will work for all browsers capable of using a proxy.
  • Privoxy will run on a number of operating systems including OS2 and Windows.
  • It helps to have a beefy machine when using Privoxy. I have notice that on my slowest machine , that Privoxy makes the browser appear sluggish.
blog comments powered by Disqus