Solaris Java Plug-in User's Guide

Automatic Proxy Configuration

Both Internet Explorer and Netscape Navigator support automatic proxy configuration. The browser's automatic proxy configuration is set to a particular URL that contains a JavaScript file with .pac or .js extension. This file contains a function called FindProxyForURL() that contains the logic to determine which proxy server to use when the browser receives a connection request. This function is written by the system administrator for the particular intranet environment. When the browser starts up, it recognizes the URL of the JavaScript file and downloads the file to the local machine using direct connection. Then whenever it needs to make a new connection, the browser executes the JavaScript function FindProxyForURL() in the file to obtain the proxy information to set up the connection.

Internet Explorer: During startup, Java Plug-in downloads the JavaScript file to the local machine using direct connection. Then whenever it needs to make a new connection, it executes the FindProxyForURL function to obtain the proxy information using the JavaScript engine in Internet Explorer.

Netscape Navigator browser:During startup, Java Plug-in downloads the JavaScript file to the local machine using direct connection. Then whenever it needs to make a new connection, it executes the FindProxyForURL() function to obtain the proxy information by using the JavaScript engine in the Netscape Navigator browser.

There are a number of predefined JavaScript functions which can be called from the JavaScript function FindProxyForURL(). Java Plug-in provides its own implementation of these functions to completely emulate the automatic proxy configuration. Here are a few notes regarding this implementation:

Note that executing the function FindProxyForURL() always returns proxy information as a string. Java Plug-in extracts the setting in the following way:

For more information about automatic proxy configuration in your browser, consult the user guide for your browser.