Ad blocking

(Cleanup and expansion)
(Removing)
Line 1: Line 1:
Not only does blocking ads remove their annoyance and distraction, it also reduces bandwidth usage and decreases CPU load. This can decrease page loading and rendering time, and reduce memory usage, especially on slower connections. There are a number of methods for blocking ads, each with their own set of pros and cons.
Not only does blocking ads remove their annoyance and distraction, it also reduces bandwidth usage and decreases CPU load. This can decrease page loading and rendering time, and reduce memory usage, especially on slower connections. There are a number of methods for blocking ads, each with their own set of pros and cons.
-
== Option 1: Privoxy ==
+
== Hosts and CSS ==
-
Privoxy is an application that can function, among other things, as an ad filtering proxyserver. That means that instead of directly connecting to the internet you route communication via this application.  
+
This is the recommended method, as the performance impact of the other methods is non-trivial.
Pros:
Pros:
-
* Doesn't slow down browsing much
+
* Lowest performance impact (effectively zero).
-
* Fairly easy to install
+
Cons:
Cons:
-
* Works only for the saved connections where it is configured
+
* Less thorough and effective than the other methods.
-
* The ad-blocking settings can only be changed by editing configuration files, although most people won't need to change the defaults. There is an option to be able to edit the configuration via http://config.privoxy.org/  but this is turned off by default because of security risks.
+
* Requires having [[root access]] and using XTerm to configure.
-
* May block some applications from network when in use
+
* Time consuming to temporarily disable.
 +
* The 'hosts' file may block network access from some applications as the rules in it are used by all applications accessing the network.
-
To install do the following:
+
=== Hosts ===
-
* Install the repository that contains 'privoxy' from http://www.gronmayer.com/it/. At the moment of writing the latest version is os2007 ('Bora'), but it works fine in os2008 ('Chinook').
+
-
* install Privoxy from the tablet's application manager. After installing you won't see Privoxy in the menu. It just works in the background while it is installed.
+
-
* Close the network connection on the tablet
+
-
* Go to 'Settings' -> 'Control Panel' -> 'Connectivity' -> 'Connections'
+
-
* Select the connection for which you want to use Privoxy.
+
-
* Click 'Edit', 'Next', 'Next', 'Next', 'Advanced'
+
-
* At the 'Proxies' tab select 'Use Proxy'
+
-
* At 'HTTP proxy' and 'HTTPS proxy' fill in '127.0.0.1'
+
-
* At 'Port Number' under  'HTTP proxy' and 'HTTPS proxy' fill in '8118'
+
-
* click 'Ok', 'Finish','Done', 'Ok'
+
-
* Connect to the network again with the connection you just changed
+
-
Now this connection uses Privoxy and ads should be blocked. For each saved connection with which you want to use Privoxy you need to edit the proxy settings as shown above. Although you can change the ad-blocking settings by editing the configuration files in /etc/privoxy, the default settings will work for most people. Editing requires root permissions.  
+
The hosts file works by blocking access to a large number of know advertising servers, thus preventing the browser from loading content from those servers. Although the hosts file prevents advertising content from being loaded, it does not remove those elements from the page. Which is why it is used in conjunction with the CSS method.
-
It is possible that Privoxy stops some applications from connecting to the network as all applications are now forced to go via Privoxy for http and https access. The Wayfinder Map application for example cannot download maps via a connetion with Privoxy. A simple solution is to make another network connection via Settings that does not use Privoxy and switch between them when necessary. Or, if you know the exact domain(s) the application tries to access, you could add the domain to Privoxy's whitelist. To do so edit /etc/privoxy/user.action and put it under the section ' { -block }'.
+
The rules for these blocks are put into /etc/hosts. Simply append the contents of [http://everythingisnt.com/hosts.html this hosts file] to the end of your hosts file. To edit it you need [[root access]]. Be careful to add it to the existing contents instead of overwriting them, as these are necessary for normal operation of the tablet.
-
See also: [http://www.privoxy.org/ www.privoxy.org].
+
=== CSS ===
 +
 
 +
The CSS method uses a custom stylesheet that the browser will apply to all pages. This stylesheet has rules for removing advertising elements from the page. So the hosts file prevents the content from being loaded, and the CSS stylesheet prevents the elements from being rendered.
 +
 
 +
Simply place [http://floppymoose.com this useContent.css] file into /home/user/.mozilla/microb/chrome/userContent.css and restart MicroB.
== Adblock Plus ==
== Adblock Plus ==
Line 44: Line 37:
You can save time building up your block list by copying your existing ''patterns.ini'' to your tablet here: ''/home/user/.mozilla/microb/adblockplus''. For example, on Windows XP it can be found in C:\Documents and Settings\User\Application Data\Mozilla\Firefox\Profiles\xxxxxxx.default\adblockplus.
You can save time building up your block list by copying your existing ''patterns.ini'' to your tablet here: ''/home/user/.mozilla/microb/adblockplus''. For example, on Windows XP it can be found in C:\Documents and Settings\User\Application Data\Mozilla\Firefox\Profiles\xxxxxxx.default\adblockplus.
-
 
-
== Hosts and CSS ==
 
-
Editing the 'hosts' and/or  'userContent.css' files.
 
-
 
-
Pros:
 
-
* Lowest performance impact (effectively zero).
 
-
Cons:
 
-
* Less thorough and effective than the other methods.
 
-
* Requires having [[root access]] and using XTerm to configure.
 
-
* Time consuming to temporarily disable.
 
-
* The 'hosts' file may block network access from some applications as the rules in it are used by all applications accessing the network.
 
-
 
-
=== Hosts ===
 
-
 
-
The hosts file works by blocking access to a large number of know advertising servers, thus preventing the browser from loading content from those servers. Although the hosts file prevents advertising content from being loaded, it does not remove those elements from the page. Which is why it is used in conjunction with the CSS method.
 
-
 
-
The rules for these blocks are put into /etc/hosts. Simply append the contents of [http://everythingisnt.com/hosts.html this hosts file] to the end of your hosts file. To edit it you need [[root access]]. Be careful to add it to the existing contents instead of overwriting them, as these are necessary for normal operation of the tablet.
 
-
 
-
=== CSS ===
 
-
 
-
The CSS method uses a custom stylesheet that the browser will apply to all pages. This stylesheet has rules for removing advertising elements from the page. So the hosts file prevents the content from being loaded, and the CSS stylesheet prevents the elements from being rendered.
 
-
 
-
Simply place [http://floppymoose.com this useContent.css] file into /home/user/.mozilla/microb/chrome/userContent.css and restart MicroB.
 
[[Category:Users]]
[[Category:Users]]
[[Category:Web]]
[[Category:Web]]

Revision as of 04:02, 27 October 2008

Not only does blocking ads remove their annoyance and distraction, it also reduces bandwidth usage and decreases CPU load. This can decrease page loading and rendering time, and reduce memory usage, especially on slower connections. There are a number of methods for blocking ads, each with their own set of pros and cons.

Contents

Hosts and CSS

This is the recommended method, as the performance impact of the other methods is non-trivial.

Pros:

  • Lowest performance impact (effectively zero).

Cons:

  • Less thorough and effective than the other methods.
  • Requires having root access and using XTerm to configure.
  • Time consuming to temporarily disable.
  • The 'hosts' file may block network access from some applications as the rules in it are used by all applications accessing the network.

Hosts

The hosts file works by blocking access to a large number of know advertising servers, thus preventing the browser from loading content from those servers. Although the hosts file prevents advertising content from being loaded, it does not remove those elements from the page. Which is why it is used in conjunction with the CSS method.

The rules for these blocks are put into /etc/hosts. Simply append the contents of this hosts file to the end of your hosts file. To edit it you need root access. Be careful to add it to the existing contents instead of overwriting them, as these are necessary for normal operation of the tablet.

CSS

The CSS method uses a custom stylesheet that the browser will apply to all pages. This stylesheet has rules for removing advertising elements from the page. So the hosts file prevents the content from being loaded, and the CSS stylesheet prevents the elements from being rendered.

Simply place this useContent.css file into /home/user/.mozilla/microb/chrome/userContent.css and restart MicroB.

Adblock Plus

Adblock Plus is a plugin for Mozilla based browsers, such as Firefox and the MicroB.

Pros:

  • Easy to install.
  • Has no influence on other applications than the browser.
  • Is more thorough and effective than the hosts/CSS method.

Cons:

  • Significant performance impact that often offsets the benefits of blocking ads.

It is available from the Browser Extras repository.

You can save time building up your block list by copying your existing patterns.ini to your tablet here: /home/user/.mozilla/microb/adblockplus. For example, on Windows XP it can be found in C:\Documents and Settings\User\Application Data\Mozilla\Firefox\Profiles\xxxxxxx.default\adblockplus.