lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev Q: Proxy Automatic Configuration


From: David Woolley
Subject: Re: lynx-dev Q: Proxy Automatic Configuration
Date: Tue, 9 Mar 1999 22:13:44 +0000 (GMT)

> function FindProxyForURL(url, host)
> {
>   return "PROXY proxy.tli.de:8080; DIRECT";
> }
> 
> Is this JAVA script? How does this work and is this mechanism
> supported by lynx?

It is JavaScript, which is not related to Java.

This is such a trivial example that it probably shouldn't have been
done this way.  The only advantage it gives over a simple configuration
is that it allows a direct connection as a fallback, although it
could also be used to allow the ISP to change the proxy in the future,
although there are arguably better ways, even if you want to do load
sharing.

url is the full URL, host is the host name part.  The function then
does arbitrary processing on these, typically involving regular 
expression, or at least substring, processing, and conceivably even
checking the time of day and then indicates the proxy to use, whether
to go direct, or whether to reject.

Because the processing is general, you need the whole of the JavaScript
core, although I don't think you need much, if any, of the browser
object model.

Lynx has no JavaScript support, but see other threads.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]