Caching
Cache-Control
The primary header for controlling caching behavior, defining how and for how long responses can be cached.
Syntax
Cache-Control: <directive>, <directive>
Example
Cache-Control: public, max-age=31536000, immutable
Description
Cache-Control is the primary mechanism for controlling HTTP caching. Specifies directives for browser and CDN/proxy caches.
Key directives: max-age=N, no-cache (must revalidate), no-store (never cache), public, private, must-revalidate, immutable.
Best practice: long max-age with versioned URLs for static assets, short max-age or no-cache for HTML.
Check if your website sends this header correctly
Check your headers →