07/07/2009, 06:44 PM
|
#1 (permalink) |
|
Member
![]() Join Date: Jun 2009
Posts: 130
Likes Received: 1
Thanks: 23
Thanked 9 Times in 6 Posts
|
I am not a developer, yet I think something the Pre really needs is a good ad blocker for the browser. Right now, the browser loads most of a web page's content content immediately, then sits and loads the ads for the site. This normally wouldn't be an issue, but double tapping to auto-zoom in does not stick until a web site is completely loaded.
So, how feasible would it be to make an ad blocker for the web browser? Initially it could just be a quick hack, but ultimately it would be best if such a program would have the ability to auto-download its own filters. Thoughts? |
07/07/2009, 11:51 PM
|
#5 (permalink) |
|
Member
![]() Join Date: Sep 2003
Posts: 418
Likes Received: 38
Thanks: 19
Thanked 35 Times in 26 Posts
|
When you go to a web site, you enter the domain name-- www.google.com. That resolves to an IP address like 128.33.12.129.
That's currently done using using DNS-- domain name service. Your internet-capable device talks to a DNS server and says "hey, where is www.google.com at?" If your DNS server knows the answer, it will send it back to you. If not, it will check at a higher level to see who *does* know the answer, and go get it. DNS didn't exist when the internet first got started-- there were so few machines that it was possible to manually track them all. This was done with what's know as a host file-- instead of going to a DNS server to see where www.google.com is at, you would check that file to get the IP address. The upshot of all this is that all tcp-IP based devices still use that host file as their first lookup point for addresses. There are a variety of reasons why you might do this, but ad blocking is the most common-- I can say "ads.doubleclick.com" is really the same IP address as Google, so when it tries to get an ad, the program isn't there, and the ad never appears. On windows, the file is in c:\windows\system32\drivers\etc\hosts. Not sure where it is on the Pre, but it should be relatively easy to find & update. The hosts files I was seeing online were huge-- around 1.5MB-- which might be a lot for the Pre. What I would do is hit your favorite web pages with a real PC, see where the ads are coming from, then block just those sites. |
07/08/2009, 05:32 AM
|
#8 (permalink) |
|
Member
![]() Join Date: Jun 2009
Posts: 360
Likes Received: 0
Thanks: 10
Thanked 66 Times in 35 Posts
|
Another way to go would be to sent up a proxy on the phone and forward port 80 through it using iptables kinda like this:
Transparent Proxy as Adblock using Tinyproxy and Dansguardian « BroddlIT A hosts file manager app would be neat too. |
07/08/2009, 10:28 AM
|
#10 (permalink) |
|
Member
![]() Join Date: Oct 2007
Posts: 534
Likes Received: 0
Thanks: 18
Thanked 16 Times in 11 Posts
|
Here's a hosts file i found that seems pretty extensive. I'm testing it and it doesn't seem to slow things down at all.
http://phwelo.mobi/hosts heres an ipk to make it easier for some: http://phwelo.mobi/ipks/hosts.ipk |
07/29/2009, 04:06 PM
|
#11 (permalink) |
|
Homebrew Developer
![]() Join Date: Dec 2007
Location: D.C. Area
Posts: 195
Likes Received: 0
Thanks: 73
Thanked 39 Times in 20 Posts
|
I used the one from:
Blocking Unwanted Parasites with a Hosts File and it's working well. One point though: if ^M characters at the end of the line bug you (they bug me!), then you can remove them with: Code:
cat file1 | sed s/.$//g >> file2 ![]() Also don't forget to append your new hosts file to your old one (>>) and remove the duplicate "127.0.0.1 localhost" line from the appended file. |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|



