# PAC cached for more than a day

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

Rule PAC-D005 (`cache-control-too-long`), severity low, category: Delivery (HTTP headers).

A max-age of several days lets proxies, CDNs and clients that keep the PAC file in an HTTP cache use a wrong or outdated file for that long. Chrome and Firefox are not affected. Keep max-age at a day or less.

## Why it matters

Chrome, Edge and Firefox fetch the PAC file past the HTTP cache, so for them `max-age`
changes nothing; the page [Reset the PAC cache](/articles/pac-cache-reset/) shows when they
load the file again. Caches between the server and the client (a reverse proxy, a CDN, a
forward proxy) and clients that use an ordinary HTTP cache do follow it. With
`max-age=604800` such a cache can hand out a PAC file that routes a critical application
wrongly for a week. Keep `max-age` at a day (86400 seconds) or less; 3600 is a common choice.


## How to fix

Lower max-age to 86400 or less (3600 is a common choice).

## Bad

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

## Good

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