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 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.
How to fix
Enable gzip (mod_deflate / gzip on) for application/x-ns-proxy-autoconfig responses.
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 checkerRelated rules
- PAC file is large PAC-P006