# No Cache-Control header on the PAC response

Source: https://findproxyforurl.net/rules/missing-cache-control/ · last updated 2026-10-14

Rule PAC-D003 (`missing-cache-control`), severity medium, category: 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](/articles/pac-cache-reset/).

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.

## Bad

```js
HTTP/1.1 200 OK
Content-Type: application/x-ns-proxy-autoconfig
Content-Length: 1234
```

## Good

```js
HTTP/1.1 200 OK
Content-Type: application/x-ns-proxy-autoconfig
Cache-Control: max-age=3600
Content-Length: 1234
```

## Engine behaviour

- chromium: The 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. (source: code, verified 2026-10-13)
- firefox: The 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. (source: code, verified 2026-10-13)
