Cache-Control is an HTTP header, sent in responses and requests, that defines caching directives. Values like max-age, no-store, no-cache and public tell browsers and shared caches how to treat a response.
Why it matters
The header directly controls speed and freshness. Long lifetimes on static files make repeat visits fast and reduce bandwidth, while short or no caching on dynamic or private pages prevents stale or leaked data.
You can read the header on any URL with a response header inspector; CDNs may add or override it, so test the final response a visitor receives, not just your origin.
Example
Cache-Control: public, max-age=86400
Cache-Control: private, no-store
The first lets any cache keep the file for a day. The second keeps personal data out of caches entirely.
Common mistakes
- Believing
no-cachemeans do not store; it means revalidate before reuse.no-storeforbids storing. - Giving HTML a year-long lifetime without versioned URLs.
- Letting a CDN cache logged-in pages by omitting
private.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
यह पेज सामान्य जानकारी है, जिसे हमारी संपादकीय टीम ने लिखा है और दस्तावेज़ीकरण बदलने पर अपडेट किया जाता है। सर्वर और प्रदाता अलग-अलग होते हैं, इसलिए बदलाव पहले सुरक्षित तरीके से जाँचें। देखें: संपादकीय नीति और अस्वीकरण.