Skip to content

What is Cache-Control Headers?

Response headers telling browsers and CDNs how long to reuse a file. This site serves its RSS feed with a one-hour public cache, while hashed static assets can carry far longer lifetimes because filenames change on rebuild.

Example

The blog RSS endpoint returns public cache headers with a one-hour lifetime, so feed readers refetch hourly without hammering the origin — a small server file setting with outsized bandwidth savings.

What people get wrong

Caching HTML as aggressively as hashed assets is the classic mistake: visitors then see yesterday’s headlines. Cache versioned files long, revalidate markup short, and never confuse the two.

Frequently asked questions

Why can hashed assets cache longer than HTML?

A new build writes new filenames, so old cached copies can never shadow fresh code. HTML keeps its URL across deploys, so it needs short lifetimes or revalidation to stay fresh.

Sources

Browse all Build & Render Performance terms →