Ad blocking

(Cleanup and expansion)
Line 1: Line 1:
-
Not only does blocking ads remove their annoyance and distraction, it also reduces the bandwidth usage. This may make pages load quicker depending on the method chosen and network connection. Especially on slower connections the speed gained by the reduced amount of data to download outweights the extra overhead of the ad blocker. Choose any of the following options or a combination:
+
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 ==
== Option 1: Privoxy ==
Line 31: Line 31:
See also: [http://www.privoxy.org/ www.privoxy.org].
See also: [http://www.privoxy.org/ www.privoxy.org].
-
== Option 2: Adblock Plus ==
+
== Adblock Plus ==
-
Adblock Plus is a plugin for Mozilla based browsers, such as Firefox and the Microb browser on the Internet Tablet OS2008.
+
Adblock Plus is a plugin for Mozilla based browsers, such as Firefox and the MicroB.
Pros:
Pros:
-
* Easy to install
+
* Easy to install.
-
* Has no influence on other applications than the browser
+
* Has no influence on other applications than the browser.
 +
* Is more thorough and effective than the hosts/CSS method.
Cons:
Cons:
-
* Adds a short delay to the loading of the first browser window, proportional to the number of block entries.
+
* Significant performance impact that often offsets the benefits of blocking ads.
-
It can be installed by finding and installing the repository from http://www.gronmayer.com/it/, and then install it from the Application Manager.
+
It is available from the Browser Extras repository.
-
* TIP
+
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.
-
Save time building up your block list by copying your existing ''patterns.ini'' to your tablet here: ''/home/user/.mozilla/microb/adblockplus''
+
-
e.g. On Windows XP this can be found here: ''C:\Documents and Settings\User\Application Data\Mozilla\Firefox\Profiles\xxxxxxx.default\adblockplus''
+
== Hosts and CSS ==
-
 
+
-
== Option 3: editing 'hosts' and 'userContent.css' ==
+
Editing the 'hosts' and/or  'userContent.css' files.
Editing the 'hosts' and/or  'userContent.css' files.
Pros:
Pros:
-
* Slows down browsing the least of all methods
+
* Lowest performance impact (effectively zero).
Cons:
Cons:
-
* Less sophisticated solution than the other options
+
* Less thorough and effective than the other methods.
-
* Requires using the command line, root access and edit configuration files to set it up
+
* Requires having [[root access]] and using XTerm to configure.
-
* Requires more work if you want to temporarily turn it off
+
* 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.
* The 'hosts' file may block network access from some applications as the rules in it are used by all applications accessing the network.
-
The file /etc/host file can be used to block certain domain names. An example of what to put in this file can be found [http://everythingisnt.com/hosts.html here]. 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. For a detailed how-to see [http://www.internettablettalk.com/forums/showpost.php?p=128028&postcount=20 this forum-topic].
+
=== 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.
-
The file /home/user/.mozilla/microb/chrome/userContent.css is read by the Microb webbrowser and allows to have custom rules for how to display certain elements on a page. http://floppymoose.com has an example of what to put in this file. Save the contents to it, or create it if it doesn't exist,  set the right permissions of the file, and restart the browser.
 
[[Category:Users]]
[[Category:Users]]
 +
[[Category:Web]]

Revision as of 04:00, 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

Option 1: Privoxy

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.

Pros:

  • Doesn't slow down browsing much
  • Fairly easy to install

Cons:

  • Works only for the saved connections where it is configured
  • 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.
  • May block some applications from network when in use

To install do the following:

  • 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.

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 }'.

See also: www.privoxy.org.

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.

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 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.