Amhost Labs

Cache-Control missing

Markdown-backed fix guides for Amhost Labs audit findings.

What is it?

Cache-Control is an HTTP response header that tells browsers, CDNs, and proxies how a response may be stored and reused. This warning belongs to HTTP header configuration.

Why does it matter?

Missing cache rules can hurt performance for static assets and can also create privacy risk for dynamic or authenticated pages. Receivers have to guess whether a response is reusable, which can lead to inconsistent behavior across browsers and intermediaries.

How to fix it?

Set an explicit policy based on the type of response. For private pages, prevent storage:

Cache-Control: no-store

For versioned static assets, allow long-lived caching:

Cache-Control: public, max-age=31536000, immutable

Configure this at the CDN, reverse proxy, or application framework so both static and dynamic responses get the correct policy.