Bust Banner Ads with Proxy Auto Configuration


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 the coolest thing I've seen in a long time.
- unsolicited comment from a new user.
Over two million (more or less) banner ads blocked since 1996!

no-ads.zip, 15K bytes (or no-ads.tgz, 16K bytes)
Version 5.116 released on Wednesday, 2014-Apr-23 20:19:00 CDT
Recent changes:
5.116 2014/04/24 whitelist massdrop                                 +2-2
5.115 2014/04/12 add gmail, gstatic                                 +2-2
5.114 2014/03/24 add chitika.net                                    +2-1
5.113 2014/03/23 add chartbeat.net (tracking)                       +2-1
5.112 2014/03/23 add projects.wsj.com                               +2-2
5.111 2014/02/04 add outbrain.com ("you may also like")             +4-1
5.110 2013/12/18 Minor cleanup.                                     +5-7
                 whitelist addons.cdn.mozilla.net
5.109 2013/11/23 whitelist adorama                                  +2-2
5.108 2013/09/30 whitelist css                                      +5-4
5.107 2013/06/04 add extra whitelist                                +3-3
5.106 2013/05/23 more whitelist rules                               +3-3
5.105 2013/03/07 other whitelist and blocks                         +25-9
5.104 2012/10/07 block hideus.in, popadscdn.net; whitelist advantage and www.google.com +7-3
5.103 2012/06/21 add plus.google.com                                +2-2
5.102 2012/06/11 whitelist code.google.com and feature=banner       +16-14
5.101 2012/04/05 whitelist advogato; block dt07.net                 +5-3
5.100 2012/01/10 don't block hosts starting with "advance"          +2-2
 5.99 2011/12/09 whitelist android market                           +2-2
 5.98 2011/12/09 whitelist vupload.facebook.com                     +2-2
 5.97 2011/12/04 whitelist facebook "upload_popup"                  +2-2
 5.96 2011/10/04 match "popupplayer"; whitelist adf.ly              +9-7
 5.95 2011/04/13 comment out facebook "hijack" (for now);           +17-7
                 block bogus virusscan attack
 5.94 2011/01/29 Facebook is the new evil                           +18-3
 5.93 2011/01/29 last whitelist updates                             +5-4
 5.92 2010/04/21 buysellads                                         +20-11
 5.91 2009/12/31 more white                                         +16-11
 5.90 2009/12/20 ad servers                                         +7-2
 5.89 2009/12/16 updates                                            +8-3
 5.88 2009/10/21 add whitelist to negate re_banner                  +21-6
 5.87 2009/04/04 allow popcorn                                      +4-3
                 catch 'animated_favicon'
 5.86 2009/02/01 allow advizia                                      +3-3
 5.85 2009/02/01 whitelist tirerack                                 +10-3
 5.84 2009/01/03 try to not block guids                             +12-17
 5.83 2008/12/29 change white space                                 +4-4
 5.82 2008/12/29 more banner sites                                  +6-1
 5.81 2008/12/13 newads                                             +4-2
 5.80 2008/11/11 remove extra 'var'                                 +2-2

What Is This?

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).

How Do I Use This?

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)

Where Can I Get Help With This?

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).

How Does This Work?

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)

What Browsers Does This Work With?

Please post updates and corrections to the web forum.

How Do I Add URLs To Block?

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).

Does This Work If I Already Use A Proxy?

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.

Why Is This Better Than An Ad-removing Proxy?

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.

Why Is This Better Than A Hosts File?

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.

How Do I Know If It's Working?

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.

Black Hole Proxy Servers

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:

How Do I Deactive no-ads For Just One Site?

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.

Old Versions of no-ads.pac

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.

    Does This Stop Popups / Popunders?

    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.


    This page accessed [an error occurred while processing this directive] times.
    Last modified on Thursday, 2008-Oct-23 13:30:18 CDT.
    Send comments to John@LoVerso.Southborough.MA.US.
    Back to my home page