Re: Pop-up killing http proxy
by sauoq (Abbot) on Sep 02, 2002 at 18:37 UTC
|
Where is a good Perlish starting point for building an http proxy which would filter out ads by rewriting Javascript on the fly and removing all Flash?
Rewriting JavaScript on the fly is going to be quite literally impossible to get right. You might as well just strip it out. Of course, there's no reason not to just turn it off in your browser.
There are other ways to avoid the bulk of nuisance ads. One easy trick that you can use is to put fake entries in your hosts table for sites that serve them. This is especially useful for those that have chaining pop-ups and pop-unders where another one opens up as soon as you close one.
-sauoq
"My two cents aren't worth a dime.";
| [reply] |
|
True, I can turn off Javascript but then a lot of things won't work properly. Stripping out selective Javascript and Applet tags would be a good start I suppose. I am intrigued by what you said about the hosts table. Is this something I can do on a Windows box?
~~~~~~~~~~~~~~~
I like chicken.
| [reply] |
|
Under WINNT/WIN2K/WINXP the hosts file is located in
%systemroot%\system32\drivers\etc\hosts
Try this search to find more info on setting it up and also pre-configured hosts files for blocking server known to serve pop-up adds. Beware, they can get pretty big. Mine is currently 450k or near 12500 lines. This does not seem to have any noticable effect on my browsing, but others have reported some degradation.
I haven't seen a pop-up for ... well, a long, long time.
Then again, I don't have js enabled except for specific sites and Opera 6 has a built-in pop-up refusal option too.
As my Dad would have said. "A belt and braces man".
Also, I have no knowledge of the one you mentioned, but in the past I used an ad blocking proxy that seemed fairly effective called Proxomitron, which has some pretty nifty features, regex search and replace etc, but the maintainence was quite high. The hosts file solution is infinitly better.
Well It's better than the Abottoire, but Yorkshire!
| [reply] [d/l] |
|
Yes, you can. Take a look at c:\windows\hosts.sam.
Create a file called c:\windows\hosts and insert a line like
127.0.0.1 spammer.com
to block the domainname spammer.com. Incidentially, you can even add
127.0.0.2 project1
127.0.0.3 project2
and configure a webserver (e.g. apache) to run on these adresses, and you'll have a nice way to test-drive your websites, if you develop any. | [reply] |
Re: Pop-up killing http proxy
by Aristotle (Chancellor) on Sep 02, 2002 at 20:36 UTC
|
| [reply] |
Re: Pop-up killing http proxy
by nmerriweather (Friar) on Sep 02, 2002 at 23:18 UTC
|
you can also take advantage of the host file project!
http://remember.mine.nu
works on all os's -- just place the hosts file where it goes for your os, and all material from those servers (several thousand, kept up to date) is summarily rejected
you still get popups and iframes -- but they're all blank.
makes loading pages super fast! | [reply] |
Re: Pop-up killing http proxy
by schumi (Hermit) on Sep 03, 2002 at 06:28 UTC
|
It's not really Perl-ish, but I use the Proximitron. It does the job very nicely, killing pop-ups and lots of other annoying stuff. You can configure it "down to the creek", as we say in Swiss German.
The only disadvantage is that you need two additional dlls if you want to use ssl - of which I can't remember where I got them. But you can find them easily with google or any other search engine. The documentation is quite good.
--cs
There are nights when the wolves are silent and only the moon howls. - George Carlin | [reply] |
Re: Pop-up killing http proxy
by richardX (Pilgrim) on Sep 03, 2002 at 09:28 UTC
|
I use the program Adsubtract that comes with Zonealarm from Zone Labs. It allows for tons of configuration and it puts a JavaScript blocker into every HTML file retrieved automatically.
Richard
There are three types of people in this world, those that can count and those that cannot. Anon | [reply] |
Re: Pop-up killing http proxy
by strredwolf (Chaplain) on Sep 03, 2002 at 05:38 UTC
|
| [reply] |