Proxy auto-config: Difference between revisions

Content deleted Content added
m DnsResolve: change "your" to "the"
BrnVrn38 (talk | contribs)
Add the possibility to use local PAC file.
Line 28:
| accessdate=2013-07-05}}</ref> and is a [[text file]] that defines at least one JavaScript function, '''<code>FindProxyForURL(url, host)</code>''', with two arguments: '''<code>url</code>''' is the URL of the object and '''<code>host</code>''' is the host-name derived from that URL. By convention, the PAC file is normally named '''<code>proxy.pac</code>'''. The [[Web Proxy Autodiscovery Protocol|WPAD standard]] uses '''<code>wpad.dat</code>'''.
 
To use it, a PAC file is published to a [[HTTP server]], and client user agents are instructed to use it, either by entering the URL in the proxy connection settings of the browser or through the use of the WPAD protocol. The URL may also reference a local file as for example: '''<code>file:///etc/proxy.pac</code>'''.
 
Even though most clients will process the script regardless of the [[MIME type]] returned in the [[HTTP reply]], for the sake of completeness and to maximize compatibility, the HTTP server should be configured to declare the MIME type of this file to be either '''<code>application/x-ns-proxy-autoconfig</code>''' or '''<code>application/x-javascript-config</code>'''.