PAC-D004 · cache-control-no-cache

PAC marked no-cache / no-store / max-age=0

low · Delivery (HTTP headers)

Forbidding caching does not make changes reach Chrome or Firefox faster, because they fetch the PAC file past the HTTP cache anyway. It makes proxies, CDNs and clients that use an HTTP cache fetch the file from the server every time, which adds load and makes the PAC server a dependency for them.

Why it matters

Chrome, Edge and Firefox do not take the PAC file from the HTTP cache, so no-cache changes nothing for them; the page Reset the PAC cache shows when they load the file again. For caches between the server and the client and for clients that use an ordinary HTTP cache, no-cache, no-store or max-age=0 means that every fetch goes to the PAC server. PAC changes are rare, so a short positive max-age such as 600 gives nearly the same freshness with fewer fetches, and those clients keep working from their copy if the PAC server is briefly unreachable.

How to fix

Use Cache-Control max-age=600 (or longer) instead of no-cache.

Examples

Bad

HTTP/1.1 200 OK
Content-Type: application/x-ns-proxy-autoconfig
Cache-Control: no-cache, no-store
Open bad example in checker

Good

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

Related rules

References

Last updated: