Editing Ad blocking

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 18: Line 18:
The hosts file works by blocking access to a large number of known 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, so you may see warnings about missing pages, images, and scripts. This method can be used in conjunction with the [[#CSS|CSS method]] for element hiding.
The hosts file works by blocking access to a large number of known 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, so you may see warnings about missing pages, images, and scripts. This method can be used in conjunction with the [[#CSS|CSS method]] for element hiding.
-
The rules for these blocks are put into <code>/etc/hosts</code>. Simply append the contents of [http://www.mvps.org/winhelp2002/hosts.htm one of the example hosts files] 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.
+
The rules for these blocks are put into /etc/hosts. Simply append the contents of [http://www.mvps.org/winhelp2002/hosts.htm one of the example hosts files] 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.
Of particular use in doing this is the program "Advoid", which can be found in one of the repositories.  (Just search the OS2008 downloads and you should find it.)  This program can download the latest hosts file from http://www.mvps.org and update your tablet's hosts file, thus eliminating the need for becoming root and manually editing the hosts file yourself.   
Of particular use in doing this is the program "Advoid", which can be found in one of the repositories.  (Just search the OS2008 downloads and you should find it.)  This program can download the latest hosts file from http://www.mvps.org and update your tablet's hosts file, thus eliminating the need for becoming root and manually editing the hosts file yourself.   
Line 36: Line 36:
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, it does however '''not''' prevent the advertisements from downloading. Any of the other solutions on this page can be used to prevent downloading advertisements and save bandwidth. The CSS method does provide very advanced options to adjust the rendering of webpages, for example not only for removing ads but also for adjusting the layout to your internet tablet.
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, it does however '''not''' prevent the advertisements from downloading. Any of the other solutions on this page can be used to prevent downloading advertisements and save bandwidth. The CSS method does provide very advanced options to adjust the rendering of webpages, for example not only for removing ads but also for adjusting the layout to your internet tablet.
-
For an example for such a CSS file, see [http://floppymoose.com Floppymoose.com]. Place this <code>userContent.css</code> file into <code>/home/user/.mozilla/microb/chrome/userContent.css</code> and restart MicroB.
+
For an example for such a CSS file, see [http://floppymoose.com Floppymoose.com]. Place this userContent.css file into /home/user/.mozilla/microb/chrome/userContent.css and restart MicroB.
Pros
Pros
Line 46: Line 46:
=== Quick Toggling ===
=== Quick Toggling ===
-
There is now a Perl script to allow you to quickly toggle on and off the hosts and CSS files. Grab [http://www.singingtree.com/~kyle/blog/archives/00000328.htm this hosts_css_toggler.txt] file and rename it to <code>hosts_css_toggler.pl</code> and make it executable.  Then just run it as root to toggle the Hosts/CSS method of ad-blocking on and off.  You will have to restart the browser for the changes to take effect.  Detailed information and instructions are available on the link provided for the script.
+
There is now a Perl script to allow you to quickly toggle on and off the hosts and CSS files. Grab [http://www.singingtree.com/~kyle/blog/archives/00000328.htm this hosts_css_toggler.txt] file and rename it to hosts_css_toggler.pl and make it executable.  Then just run it as root to toggle the Hosts/CSS method of ad-blocking on and off.  You will have to restart the browser for the changes to take effect.  Detailed information and instructions are available on the link provided for the script.
== Privoxy ==
== Privoxy ==
Line 53: Line 53:
Pros:
Pros:
-
* Lower performance impact than Adblock Plus, but ''may'' be higher than the hosts/CSS combination.
+
* Lower performance impact that Adblock Plus, but ''may'' be higher than the hosts/CSS combination.
* Fairly easy to install.
* Fairly easy to install.
* Can perform on-the-fly content modifications, for example to reformat webpages for the smaller screen.
* Can perform on-the-fly content modifications, for example to reformat webpages for the smaller screen.
Line 76: Line 76:
# Connect to the network again with the connection you just changed.
# 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 <code>/etc/privoxy</code>, the default settings will work for most people. Editing requires root permissions.  
+
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 <code>/etc/privoxy/user.action</code> and put it under the section ' { -block }'.
+
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 }'.
== Adblock Plus ==
== Adblock Plus ==
Line 94: Line 94:
It is available from the Browser Extras repository.
It is available from the Browser Extras repository.
-
You can save time building up your block list by copying your existing <code>patterns.ini</code> to your tablet here: <code>/home/user/.mozilla/microb/adblockplus</code>. For example, on Windows XP it can be found in <code>C:\Documents and Settings\User\Application Data\Mozilla\Firefox\Profiles\xxxxxxx.default\adblockplus</code>.
+
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.
Works great in compliment with Flashblock, also available in Browser Extras.
Works great in compliment with Flashblock, also available in Browser Extras.

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)

Templates used on this page: