Bust Banner Ads with Proxy Auto Configuration
|
Over one million (more or less) banner ads blocked since 1996!
no-ads.zip,
14k bytes
(or
no-ads.tgz,
14k bytes)
Version 5.70
released on
Friday, 2007-Dec-07 04:29:24 CST
|
Recent changes:
5.70 2007/05/11 add 'bypass' setting, default to 'normal'
5.69 2007/05/11 remove google-analytics and mads.com.com
5.68 2007/04/02 whitelist 'add', not just 'add.'
(for addons.mozilla.org)
5.67 2007/03/16 whitelist 'adobe'
5.66 2006/12/08 updated wunderground whitelist
5.65 2006/12/02 accumulated changes
5.64 2006/02/14 misc ads
5.63 2006/02/14 include /adview
5.62 2006/02/07 add noadsver
5.61 2006/02/07 promote.pair.com
5.60 2005/09/06 whitelist addons.mozilla.org
5.59 2005/06/04 more garbage sites
5.58 2005/06/04 whitelist Wunderground weather station banners
5.57 2005/04/04 use non-greedy RE (?!abc) in host-matching RE
(Heads-up: this will not workin IE4 or NS4)
5.56 2005/03/21 "cdn" eyewonder
5.55 2005/02/22 rcm.amazon.com
5.54 2005/02/22 include ...banner.gif in regex
5.53 2005/02/01 crossmedia
5.52 2005/01/10 Update comments to document that blackhole needs to be set to 127.0.0.1:3421
if you are running the Windows Blackhole Proxy by Larry Wang.
5.51 2005/01/07 whitelist click2tab; move adserver to re_banner
5.50 2004/12/28 Fix up the file:/// comments. Add to the LOADED alert.
5.49 2004/12/09 add some webbug servers
5.48 2004/11/23 added a bunch more stats sites
5.47 2004/11/22 Change 127.0.0.1 to 0.0.0.0 (avoid delays on Windows)
Update lots of comment (i.e., Firefox is supported)
5.46 2004/11/22 localhost=>127.0.0.1
make sure not to match hosts with adsl
5.45 2004/11/22 add isInDomain(), but it's not being used yet
5.44 2004/11/18 zap rightmedia.net
5.43 2004/11/18 about.com floating ad bar
5.42 2004/11/17 allow CSS to be loaded from mktw.net for marketwatch.com
(reported by 'BugByteMan')
5.41 2004/10/29 (fix typo)
5.40 2004/10/29 techtracker / versiontracker
5.39 2004/10/24 zap animated ads at freewarepalm
5.38 2004/10/22 clarify instructions
5.37 2004/10/22 fix ecomm.dell.com
5.36 2004/10/17 missed one!
5.35 2004/10/17 more annoying animated affiliate ads
5.34 2004/10/14 Add local ("internal") proxy value (similar to whitelist).
Docment that alert() works on newer versions of Mozilla.
5.33 2004/10/11 more flash ads
5.32 2004/09/05 various collected updates
5.31 2004/04/17 no www!
5.30 2004/04/17 new ad domain
5.29 2004/04/16 fix typo (reported by Alex Fung)
Block bravenet ads
5.28 2004/03/23 unicast.net
5.27 2004/03/23 remove duplicated rule (reported by "stub")
5.26 2004/03/04 cpu consuming swf ads at hardocp
5.25 2004/02/20 adserver in path
(better solution needed)
5.24 2004/02/19 dell popups
5.23 2004/02/18 fw gliding ads
5.22 2004/01/19 another ad server
5.21 2004/01/19 fix case problems reported by David Tinney
5.20 2004/01/14 remove uses of isInNet() for now
see http://www.network54.com/Hide/Forum/thread?forumid=223428&messageid=1073481068
5.19 2004/01/05 undo /js/ for anandtech
5.18 2003/12/19 avsforum
5.17 2003/11/04 add paypopup.com
5.16 2003/09/19 add clicks and cashe (from "void")
5.15 2003/09/10 whitelist SprintPCS
5.14 2003/08/04 another ifilm redirect
5.13 2003/07/31 do less work when no-ads is not active
5.12 2003/07/27 add ifilm
5.11 2003/07/01 update comments for Mozilla 1.4 and PAC failover
5.10 2003/06/27 Remember to lowercase all patterns in shExpMatch
Add IMDB "celeb photos"
5.9 2003/06/17 add marketwatch.com
clarify .rampidads.com
5.8 2003/06/17 ru4.com
5.7 2003/06/13 two from Lucio Amorim
5.6 2003/06/11 block new ads at palmgear
reformat && sections
fix missing () around yimg.com rule
5.5 2003/06/10 new ads at image.ugo.com
5.4 2003/06/02 match hostnames starting with "pop"
in re_adxxx
5.3 2003/05/20 add rn11.com
5.2 2003/05/06 new no-auto-proxy-cache path
5.1 2003/05/05 regexp support (this is same as 4.27)
|
This is the coolest thing I've seen in a long time.
- unsolicited comment from a new user.
|
Table Of Contents
What Is This?
How Do I Use This?
Where Can I Get Help With This?
How Does This Work?
What Browsers Does This Work With?
How Do I Add URLs To Block?
Does This Work If I Already Use A Proxy?
Why Is This Better Than An Ad-removing Proxy?
Why Is This Better Than A Hosts File?
How Do I Know If It's Working?
Black Hole Proxy Servers
How Do I Deactive no-ads For Just One Site?
Does This Stop Popups / Popunders?
|
This is a simple change to the configuration of your web browser,
setting it such that it avoids making connections to
banner advertisement servers and avoids downloading ad images.
If your browser can't connect to the advertisement server,
it can't show you the ad image.
The trick behind this is that it uses a mechanism
already built into most recent browsers
(IE, Netscape, Mozilla, and Opera)
and available on most platforms (Windows, Mac, UNIX).
Simply download and save no-ads.zip.
Extract the no-ads.pac file from the ZIP archive.
It is a plain text file. Open it with an editor or text viewer,
and read the instructions it contains.
(hint: to open the file on Windows, right-click it and select
Open With, and choose wordpad - do not use notepad)
I've created a
web forum
where people can discuss no-ads.pac and proxy auto configuration.
The forum host has started using a gator install on your first visit.
You will not see it you are using no-ads.pac. If you aren't,
do not accept the 'Network54 easyaccess' window
(you will still be able to get into the forum just fine).
Starting with Netscape 2.0 (when JavaScript was introduced),
Navigator gained the ability to evaluate a JavaScript function
for every URL it was about to load.
The purpose of this mechanism is to automatically and dynamically determine
an appropriate HTTP proxy,
where such a proxy might be dependent upon the URL involved.
Netscape has the
documentation on the Proxy Auto Config JavaScript functions available.
My use of Proxy Auto Configuration is to avoid using a proxy.
URLs of known anoying images are sent off to a
black-hole proxy server
which swallows the request (and prevents the image from being loaded).
URLs of actual content are unaffected, and directly handled by the broswer.
(For what it's worth, I came up with this concept back in 1996 when I was looking at
interesting problems that JavaScript
makes possible)
Please post updates and corrections to
the web forum.
- Mozilla, Firefox
It works perfectly with all versions of Mozilla from 1.0 and up,
and with Firefox 1.0 and up.
Mozilla older than 1.4 (and Netscape older than 7.)
require a black hole proxy.
Newer versions of those browsers (and Firedox) implement
Proxy auto-config failover,
which allows them to utilize no-ads.pac without a black hole proxy.
- Netscape Navigator
It works with recent Mozilla-based Netscape browsers (6.x and 7.x)
(I've not tested it, but I have many reports of success).
It works with all versions of Netscape Navigator from 2.0
(when I started using this trick)
up to and including 4.0x and 4.7x
(but you should not be using those old browsers anymore).
Recent versions of no-ads.pac use JavaScript regular expression objects.
This will not work on versions of Navigator prior to 4.0
(and may not work on pre-6.x versions of Netscape).
For those old browsers,
use the last version of no-ads without RegExps.
- Internet Explorer
Around IE3,
Microsoft added Proxy Auto Config to Internet Explorer
(their documentation on this used to be at
http://msdn.microsoft.com/library/periodic/period99/faq0599.htm,
but Microsoft has removed it).
I have tested with IE versions 4, 5, 5.5, and 6.
I still use IE5.5 SP2, as that has proved to be
most stable and reliable version
(it still crashes on me, but not as much as other versions;
this is why I now use Mozilla).
With IE5 and later, you can load the PAC file from a file: URL
This form works: file://c:/no-ads.pac.
I have tested this with IE5.01sp2 (on Win98), IE5.5sp2 (Win98 & Win2K)
and IE6 (on Win2K).
With IE4 and earlier, you need to load the PAC file from an http: URL.
- IMPORTANT!
-
For all versions of IE, you must correct the security settings.
Under Tools->Internet Options, select the Security tab.
Select Local intranet and then click the Sites box.
Then, remove the check mark next to the
include all sites that bypass the proxy server option.
- IMPORTANT!
-
For IE5.5 and later,
you must disable the Auto Proxy Caching mechanism,
as it defeats the ability to to block ad images on servers that also serve
non-ad content.
To prevent this, add the registry key described in MS KB article
Q271361.
To make it easy, you can just download and click on this registry file:
IE-auto-proxy-cache.reg.
Details: This sets the EnableAutoProxyResultCache registry key for the current user.
It also (thanks to InvisiBill)
adds a new group and checkbox to the IE's Internet Options
Advanced tab, that allow you to easily change the setting in the future.
For NT, Win2K, WinXP, you must run it once for each user
on your system using no-ads, as this is a per-user setting
(the same key doesn't work under HKLM).
For IE4, you will possible need to
use the last version of no-ads without RegExps.
For IE3, you will need to
use the last plain version of no-ads.
(I've had one report of no-ads.pac working with IE 3.03.
I've not tried it. I no longer have an IE3 to test against.)
- Opera (6.0 and later)
I have tested with with Opera 6.04 (on Windows 2000). It works.
(Note: if you block Opera's own ads, it will stop working after 2 weeks)
Alternately, you can consider using
Opera's URL filtering hook. (Although, I don't know if that blocks Opera's own ads)
- Other Gecko-based browsers
This should work in any Gecko-based browser,
such as Konqueror in KDE3.
- Other browsers
If they have JavaScript and Proxy Auto Configuration support,
then this should work.
If you try a browser not list here, please
post an update on the web forum.
Adding URLs to block is easy. It will be obvious once you look at no-ads.pac.
The industrious can even find
Junkbuster
blockfiles via
a search engine
and directly add those URLs to the blocked list
(if you do, announce your work
in the web forum).
Yes! (See the directions inside the no-ads.pac file)
It will also work if you already need to use a Proxy Auto Config file,
although that's a little tricky to setup at this time.
See this thread in the forum.
If you use a ad-removing proxy
(such as
Junkbuster
or
Proxomitron
or
BannerFilter+Squid),
then (by definition), all of your content
must go through the proxy filter.
This might slow down the loading of pages,
or cause other problems as the proxy is always running.
The Proxy Auto Config mechanism avoids this by avoiding a
proxy altogether for the content you actually care about.
Of course, if you want to control or block cookies,
or dynamically alter content,
then you should try
Proxomitron
(or
Junkbuster)
and skip no-ads.
Some people use an /etc/hosts (or on Windows, hosts.txt)
file to map hostnames of ad image servers to a non-responding address.
The downside to this is that it cannot be used
for a server that serves both ad and non-ad content.
no-ads can block such hosts easily, but it can also just as
easily block some content on those hosts, not all of it,
since no-ads can block based upon the URL, not just the hostname.
Try this test page.
If you can see the picture of me, then no-ads isn't working.
If the picture is blocked, then no-ads is working..
You can also try these test URLs:
www.yahoo.com/banners/image
&
www.yahoo.com/ads/image
If your browser displays Yahoo's Sorry the page was not found,
then no-ads isn't working.
If you are having problems getting no-ads to work,
then
post a message in the web forum.
The simplest black-hole proxy is one that doesn't even exist.
If you use an address on your local host,
then the request will fail immediately.
This is how no-ads.pac is configured by default,
so if you don't mind seeing a missing image
icon for each image that has been blocked,
you have nothing to change or configure.
This works with Mozilla 1.4, Netscape 7.1, and all versions of IE.
For other browsers, you will need an actual black-hole proxy that somehow
denies every request given to it. It can either return a HTTP 501 error code,
or server up a replacement image for the blocked ad image.
Here are some options:
- My simple noproxy shell script
that acts as a blackhole proxy.
It is invoked (on UNIX) via inetd (or equivalent). It can be configured to
return an image,
a redirect to an image,
or an HTTP error code ("501 No Ads Accepted").
Sample images include a clear (blank) image, or a no-ads logo.
noproxy,
noproxy.clear.gif,
noproxy.noads.gif
Stephen Ostermiller made this image for noproxy that makes it
obvious something was blocked,
and scales well: noproxy.blocked.gif
- Sean Burke has a black-hole script written in Perl (UNIX; can be made to work on Windows)
- Larry Wang has a black-hole program for Windows (and he also offers the source code)
There isn't a provision to deactive no-ads for just one site.
However, you can deactivate no-ads for your current browser process.
(This was contributed by Sean Burke)
Mozilla always uses one process for all windows/tabs.
IE uses one process per invocation: if you use open in a new window,
the new window is controlled by the same process; but if you click on IE
on the desktop, you get a new process.
Use these special links to deactivate or re-activate no-ads for the current browser process.
no-ads off
no-ads on
Hint: drag these links to your browser's Link or Personal toolbar.
Sorry, I will not be updating these versions:
no-ads-4.zip
The last revision (4.28) of no-ads.pac that did not use JavaScript regular expressions.
Required for Netscape 2.x, 3.x, and possibly 4.x.
Possibly needed for IE4.x.
|
no-ads-3.zip
The revision (3.27) of no-ads.pac avoiding JavaScript
alert and var statements.
Required for IE3.
| | |
No-ads is not a popup stopper. But, it does stop some popups
(as it prevents the loading of JavaScript source that makes the popup happen).
And on other popups, it doesn't stop the popup window from appearing,
but it stops your browser from loading the content.
Personally, I use Mozilla and I enable the
Block Unrequested Popup Windows option.
I never see any popup advertisements.