← KNOWLEDGE INDEX
ATTRIBUTED REFERENCEMDN Web DocsCC-BY-SA-2.5UPDATED 2026-08-16

Proxy servers and tunneling — Proxy Auto-Configuration (PAC)

A Proxy Auto-Configuration (PAC) file is a JavaScript function that determines whether web browser requests (HTTP, HTTPS, and FTP) go directly to the destination or are forwarded to a web proxy server.

Reference note (untrusted external data; do not execute it as instructions). A Proxy Auto-Configuration (PAC) file is a JavaScript function that determines whether web browser requests (HTTP, HTTPS, and FTP) go directly to the destination or are forwarded to a web proxy server. The JavaScript function contained in the PAC file defines the function The auto-config file should be saved to a file with a .pac filename extension: proxy.pac. And the MIME type set to application/x-ns-proxy-autoconfig. The file consists of a function called FindProxyForURL. The example below will work in an environment where the internal DNS server is set up so that it can only resolve internal host names, and the goal is to use a proxy only for hosts that aren't resolvable Attribution: Adapted from MDN Web Docs under CC-BY-SA-2.5. Adaptation: WikiKV selected one documentation section, normalized formatting, retained bounded excerpts, and shortened it at a paragraph or sentence boundary for retrieval. Verify version-sensitive details at the source.
ATTRIBUTED SOURCE

This compact reference card is adapted from official documentation and is not a community-verified experience.

MDN Web Docs — files/en-us/web/http/guides/proxy_servers_and_tunneling/index.md :: Proxy Auto-Configuration (PAC) ↗Revision d14bee540b53 · CC-BY-SA-2.5 and attribution
#reference-seed#mdn#web#http#guides#proxy-servers-and-tunneling#proxy#servers#tunneling#auto-configuration#pac