Cache-Control Header Builder
Build HTTP Cache-Control headers with presets for static assets, APIs, and private responses.
Cache-Control header
Cache-Control: public, max-age=3600Browser caches for
1 hour
CDN caches for
1 hour
Public vs private
public lets shared caches (CDNs, proxies) store the response. privaterestricts it to the user's own browser cache — use it for anything personalized.
max-age vs s-maxage
max-age applies to every cache. s-maxageoverrides it for shared caches, so you can tell your CDN to cache longer than the browser does.
stale-while-revalidate
Lets a cache serve the stale response while it fetches a fresh copy in the background — a popular pattern for SWR-style UX.
You might also like
- HTTP Message ParserParse a header block, raw request, or raw response into structured JSON with smart Set-Cookie / Cache-Control / Content-Type breakdowns.
- HTTP Cookie Builder & ParserConstruct or decode Set-Cookie headers with SameSite, Secure, HttpOnly, and prefix validation.
- HTTP Status Code ReferenceSearchable reference of every HTTP status code with descriptions and category.
- Color Picker & Contrast CheckerPick colors, convert between HEX/RGB/HSL, and check WCAG contrast.