Cache-Control header generator
Choose a starting policy, adjust its lifetime, and copy the Cache-Control response header. Nothing is changed on your website.
No signup. Inputs stay in your browser.Use shared caching only when every visitor can safely receive the same response. Keep account, cart, checkout, and personalized content excluded.
A starting point for your policy.
Cache-Control: public, max-age=300, s-maxage=3600, stale-while-revalidate=60
Values are whole seconds, bounded to 0–31,536,000. Apply this at your origin or hosting configuration, then test the response. CDN rules may override it.
Understand the directivesTHE NEXT USEFUL STEP
Get my free cache report Once your policy is deployed, verify the cache evidence.
Get a free account with three websites and 1,000 shared warming units per calendar month. Verify ownership, choose public pages, and review the results.
No card or CDN API key required.How to generate a Cache-Control header
- Choose public content, a versioned static asset, or private content.
- Set freshness lifetimes in seconds. Use shared caching only for responses that are safe for all visitors.
- Copy the header to your hosting configuration and verify the live response after deploying.
Should I use no-cache or no-store?
no-cache permits storage but requires validation before reuse. no-store prevents storage. Use a policy that matches the sensitivity of the content.