Large PAC served without compression
low
A PAC of tens of kilobytes is fetched by every client on every refresh. Text compresses well; serving it gzip-encoded to the clients that ask for compression cuts the transfer without touching the file.
Why it matters
PAC bodies are repetitive text and compress by a factor of three or more. Browsers send
Accept-Encoding: gzip on PAC fetches and accept compressed responses. For a large
deployment the saving is bandwidth on the PAC server and faster start-up on slow links;
compression does not fix the evaluation cost of a large file (PAC-P006), only its transfer.
Compress only for clients that ask for it, which is what web servers do by default: in the
lab (2026-10-11) Windows (WinHTTP) could not load a PAC that was sent gzip-compressed.
How to fix
Enable gzip (mod_deflate / gzip on) for application/x-ns-proxy-autoconfig responses, only for requests that send Accept-Encoding gzip (the web server default); never send the file compressed to a client that did not ask for it.
Examples
Bad
HTTP/1.1 200 OK
Content-Type: application/x-ns-proxy-autoconfig
Content-Length: 84211
Open bad example in checkerGood
HTTP/1.1 200 OK
Content-Type: application/x-ns-proxy-autoconfig
Content-Encoding: gzip
Vary: Accept-Encoding
Content-Length: 19744
Open good example in checkerEngine behaviour
| Engine | Behaviour | Source |
|---|---|---|
| winhttp | A PAC sent gzip-compressed (Content-Encoding: gzip) failed to load. | lab, verified 2026-10-11 |
Related rules
- PAC file is large PAC-P006