PAC-D003 · missing-cache-control

No Cache-Control header on the PAC response

medium · Delivery (HTTP headers)

Without Cache-Control, proxies, CDNs and clients that keep the PAC file in an HTTP cache decide on their own how long to keep it. Chrome and Firefox are not affected, because they fetch the file past the HTTP cache. An explicit max-age of a day or less makes the window known.

Why it matters

Chrome, Edge and Firefox do not take the PAC file from the HTTP cache, so Cache-Control does not decide how long they keep it. Chromium loads the file again after a change of IP address and checks a working script every 12 hours; Firefox loads it again after a network change and has no timer. Windows typically keeps the PAC URL and the script until the IP address of the computer changes. How to make each of them load the file at once is described on the page Reset the PAC cache.

The header does matter for caches between the server and the client, such as a reverse proxy, a CDN or a forward proxy, and for clients that keep the file in an ordinary HTTP cache. Without the header, such a cache may choose a lifetime on its own (a heuristic, RFC 9111 section 4.2.2), and a proxy change then reaches clients at unpredictable times. Send Cache-Control: max-age=N with N of a day or less (86400 seconds); 3600 is a common choice.

How to fix

Send Cache-Control with an explicit max-age of a day or less (for example max-age=3600) from the PAC server.

Examples

Bad

HTTP/1.1 200 OK
Content-Type: application/x-ns-proxy-autoconfig
Content-Length: 1234
Open bad example in checker

Good

HTTP/1.1 200 OK
Content-Type: application/x-ns-proxy-autoconfig
Cache-Control: max-age=3600
Content-Length: 1234
Open good example in checker

Engine behaviour

EngineBehaviourSource
chromiumThe PAC file is fetched without the HTTP cache, so Cache-Control has no effect. Chromium loads it again after a change of IP address and checks a working script for changes every 12 hours.code, verified 2026-10-13 · ref
firefoxThe PAC file is fetched past the HTTP cache, so Cache-Control has no effect. Firefox loads it again after a network change and does not fetch a working file again on a timer.code, verified 2026-10-13 · ref

Source: code = read in the engine's source, doc = vendor documentation, lab = observed in a lab run, expert = practitioner knowledge, not yet verified.

Related rules

References

Last updated: