PAC-D003 · missing-cache-control

No Cache-Control header on the PAC response

medium · Delivery (HTTP headers)

Without Cache-Control the browser decides when to re-fetch the PAC (hours or the whole session). A proxy change then takes effect at unpredictable times per client. An explicit max-age makes the roll-out window known and controllable.

Why it matters

Engines keep a fetched PAC for an engine-specific default period when the server says nothing; the defaults differ (Chromium re-fetches periodically, Firefox is reported to keep it for the session). During a proxy migration or an emergency fix that means some clients pick up the change in minutes and others the next day, and “clear cache and restart” advice to users does not scale. Cache-Control: max-age=N with N between ten minutes and a day gives a predictable window; shorter values trade freshness for fetch load.

How to fix

Send Cache-Control with max-age (e.g. 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
chromiumWithout caching headers the PAC is re-fetched on an internal schedule and on network changes.expert, unverified
firefoxReported to keep the PAC for the session when no caching headers are present.expert, unverified

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