maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   Ad blocking (https://talk.maemo.org/showthread.php?t=14729)

PJE 2008-01-10 13:11

Re: Ad blocking
 
I've tried various ad blocking techniques over the short time I've had my N800 - GreaseMonkey (+Scripts), Adblock+, fakeweb with modified hosts file and currently the custom userContent.css file.

The userContent.css file blocks quite a lot of ads, although not as many as the large hosts file and fakeweb, and was was wondering about the performance hit from having a large hosts file compared to the relatively small userContent.css script.

yueq 2008-01-11 00:22

Re: Ad blocking
 
Quote:

Originally Posted by free (Post 124703)
If you have a local http server running then you should change 127.0.0.1 to something else or rely on another method.

e.g. 0.0.0.0

Thanks for the nice write-up.

Aciv 2008-01-13 04:38

Re: Ad blocking
 
Quote:

Originally Posted by bexley (Post 124405)
Experiment with what? It's pretty clear that I couldn't find out how to disable it. It's not listed as a Microb component or in the settings. I've got Adblock Plus installed.

> Yes, you can disable it.

Thanks for telling me how. You chastise me for asking a question and then half-answer it.

Anyway. I'm going to try the CSS script and privoxy.

I did not chastise you. I didn't say anything personal at all, not did I mean to imply anything negative.
From the browser menu go to 'tools' -> 'components' : uncheck / check adblock plus

GeneralAntilles 2008-01-13 04:47

Re: Ad blocking
 
Quote:

Originally Posted by PJE (Post 124738)
The userContent.css file blocks quite a lot of ads, although not as many as the large hosts file and fakeweb, and was was wondering about the performance hit from having a large hosts file compared to the relatively small userContent.css script.

The idea is to use both. The big gain with the hosts over almost every other method (minus privoxy), is that it prevents the ads from even being loaded. This saves time, bandwidth, CPU and RAM.

But no, there is no hit with a large hosts. Instead of resolving the URL from a DNS server, it resolves from the hosts, which points nowhere.

PJE 2008-01-14 21:55

Re: Ad blocking
 
Quote:

Originally Posted by GeneralAntilles (Post 126584)
The idea is to use both. The big gain with the hosts over almost every other method (minus privoxy), is that it prevents the ads from even being loaded. This saves time, bandwidth, CPU and RAM.

But no, there is no hit with a large hosts. Instead of resolving the URL from a DNS server, it resolves from the hosts, which points nowhere.

So the userContent.css is post filtering the data being displayed after it's downloaded - similar to what some GreasMonkey scripts do? I was thinking it was also reducing the downloaded data... I need to do some tests.

Also, if I have a 50K host file doesn't the browser have to check every link address with the list before sending it out to the internet DNS? I was thinking about the time taken to perform this check.

GeneralAntilles 2008-01-14 22:17

Re: Ad blocking
 
Quote:

Originally Posted by PJE (Post 127720)
So the userContent.css is post filtering the data being displayed after it's downloaded - similar to what some GreasMonkey scripts do?

The elements are still downloaded, they're just not displayed.

Quote:

Originally Posted by PJE (Post 127720)
Also, if I have a 50K host file doesn't the browser have to check every link address with the list before sending it out to the internet DNS? I was thinking about the time taken to perform this check.

I'm fairly certain it just loads the info into whatever does the DNS looksup (as I believe a restart of the browser is required for changes to stick), so it's not an issue of polling the hosts file (which is a stupidly trivial thing to do anyway) and the impact is nil.

Either way, avoiding loading advertisements would most certainly make up for any slight performance hit of a large hosts file if there actually were one. :rolleyes:

coffeedrinker 2008-01-14 22:57

Re: Ad blocking
 
Make sure you do not mess up your original hosts file. See my post:

http://internettablettalk.com/forums...79&postcount=5

free 2008-01-15 11:21

Re: Ad blocking
 
Quote:

Originally Posted by coffeedrinker (Post 127772)
Make sure you do not mess up your original hosts file. See my post:

http://internettablettalk.com/forums...79&postcount=5

Exactly,
That's why in the few lines, I *append* the ad-blocking host to the current original one.

ghoonk 2008-01-15 11:41

Re: Ad blocking
 
Linux newbie here. How do I append the ad-blocking host to the original one?

PJE 2008-01-15 12:27

Re: Ad blocking
 
Quote:

Originally Posted by ghoonk (Post 128005)
Linux newbie here. How do I append the ad-blocking host to the original one?

You need to install becomeroot or easyroot to allow root access (search www.gronmayer.com/it to find it) to modify the /etc/hosts file. You will also need to install wget if you want to follow the process outlined in post #10 above (copied here):

Code:

cd /etc
sudo gainroot
wget http://www.mvps.org/winhelp2002/hosts.txt
mv hosts hosts-orig
cat hosts-orig hosts.txt > hosts
rm hosts.txt

This assumes your downloading the hosts file from the web directly onto your N8x0. I downloaded the host file via the web browser (which removes the need to install wget) and saved it to the internal SD card, so my equivalent was (assuming the downloaded file was hosts.txt):

Code:

sudo gainroot
cd /etc
mv hosts hosts-orig
cat hosts-orig /media/mmc2/hosts.txt > hosts

The 'mv hosts hosts-orig' line backs up your original file and can be recovered using 'mv hosts-orig hosts' when your in the /etc directory with root access.

I hope this clarified things. I can't stress how much of an improvement running one of these host file additions makes to the quality of web browsing ( unless you like seeing all the ads :p ).


All times are GMT. The time now is 16:27.

vBulletin® Version 3.8.8