Re: Squid & Netscape "shortcut"

From: John Lauro <jlauro@dont-contact.us>
Date: Wed, 06 Aug 97 17:18:31 -0500

On Wed, 6 Aug 1997 13:35:06 -0500 (CDT), Matt Isleb wrote:

>On Wed, 6 Aug 1997, Dave Pascoe wrote:
>
>> You know that cute little feature in Netscape that lets you type in,
>> say, just 'apple' in the Location window and it then tries, in turn:
>>
>> apple.com
>> www.apple.com
>>
>
>Yes, this very point was brought up to me by the instructors that teach
>internet classes here at the school. While I personally don't use this
>"feature," the instuctors liked it. They would be happy to see it working
>again.

You simply need to setup an automatic proxy conifuration script.
Something like what's below, but
do change the PROXY line to point to your server instead of mine....

   function FindProxyForURL(url, host)
       {

           //So the error message "no such host" will appear through
the
           //normal Netscape box - less support queries :)
           if (!isResolvable(host))
                   return "DIRECT";

           //We only cache http, ftp and gopher
           if (url.substring(0, 5) == "http:" ||
                           url.substring(0, 4) == "ftp:"||
                           url.substring(0, 7) == "gopher:")
                   return "PROXY 141.216.40.247:3128; DIRECT";

           //We don't cache WAIS
           if (url.substring(0, 5) == "wais:")
                   return "DIRECT";

           else
                   return "DIRECT";
       }

I called the file cache.pac and placed it on our server, and then have
set all web browsers to automatic configuration from:
http://cache.flint.umich.edu/cache.pac
Because the above first has the client do a DNS check, it has the side
effect of just typing 'apple' working.
Received on Wed Aug 06 1997 - 14:26:44 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:36:02 MST