Skip to content
RU
← All HTTP Headers
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.

How real sites send this header

Home-page responses of 503 popular sites from the enterno.io /check catalogue, checked in the last 30 days.

74.2% (373 of 503) send Cache-Control.

Most common values:

  • public, max-age=0, must-revalidate — 38 sites
  • no-cache, no-store, must-revalidate — 21 sites
  • no-cache — 20 sites

See it on: google.com, yandex.ru, discord.com, github.com, habr.com

Check if your website sends this header correctly

Check your headers →

Related Articles

Related Headers

Related guides

Longer-form reading on this topic from the knowledge base.

Automate this check

Set up continuous monitoring and get an alert when something breaks. No manual runs to remember.