Fill the Server: 80% off your first 4 monthly invoices, monthly billing. Ends Nov 30, 2026. 25 spots in this batch.FILL25
Fill the Server, annual: about 29.63% off your first annual invoice. Ends Nov 30, 2026.FILL25Y
Fill the Server, 2 year term: about 15.69% off your first biennial invoice. Ends Nov 30, 2026.FILL25B
Fill the Server, 3 year term: about 11.11% off your first triennial invoice. Ends Nov 30, 2026.FILL25T
80% off your first 3 months, monthly billing. Ends Dec 25, 2027.3MONTHS80
50% off your first annual Shared term. Ends Dec 31, 2027.50SHARED
Shared Starter, 3 year term: C$105.84 total.MOOSE294
20% off your first 3 monthly VPS invoices. Ends Dec 31, 2027.20VPS3
25% off your first annual base VPS term.25VPS

← All guides

Web hosting

Website cache headers: control browser and shared-cache behaviour safely

Published August 2026 · 2 min read · Updated 2026-09-05

HTTP cache headers tell browsers and shared caches how long a response can be reused and under what conditions. The right policy is different for fingerprinted static assets, HTML, APIs, authenticated pages, and content that changes without a URL change.

Classify response types before setting TTLs

Hashed CSS/JS/images can often use long immutable caching because a content change creates a new URL. HTML with the same URL may need shorter freshness or revalidation so updates appear promptly.

Authenticated/personalized responses should avoid accidental shared caching.

Understand Cache-Control directives

max-age controls client/shared freshness unless more specific directives apply; s-maxage can target shared caches; no-store forbids storage; no-cache allows storage but requires revalidation; immutable tells clients a fresh response will not change.

Choose directives from the response semantics and cache requirements.

Use validators for revalidation

ETag and Last-Modified can let clients ask whether a stale resource changed and receive 304 without downloading the full body. Ensure validators represent the actual representation served through compression/proxy layers.

Do not use weak/strong ETag semantics without understanding how your server generates them.

Test update behavior, not only headers

Publish a controlled change and verify browsers/CDNs receive it within the intended window. Purge shared caches deliberately when emergency changes must appear faster than normal TTL.

  • Classify static/HTML/private responses.
  • Set Cache-Control by semantics.
  • Use validators where appropriate.
  • Test real change propagation.

Next step

Use Cache-Control, validators and content versioning to cache static assets aggressively while keeping personalized or frequently changing responses correct.

Explore DotMoose web hosting

Keep reading

Related guides.

HTTP 500, 502 and 503 errors explained for website owners

Learn what HTTP 500, 502 and 503 errors usually indicate, which layer to investigate, what evidence to collect, and when restarting a service is not the real fix.

Read the guide

Virtualmin vs cPanel: Which Control Panel Should You Choose?

Virtualmin vs cPanel compared on licensing cost, account and site management, email, DNS, backups and migration, so you can pick the control panel that fits how you host.

Read the guide

How to move web hosting without downtime

Move a website and database with destination testing, final synchronization, controlled DNS cutover, and rollback while preserving separate mail routing.

Read the guide

More web hosting guides

We will handle the move. You check it first.

Your current site stays online until your new one is ready. You approve the copy first, and if anything is not right we switch you back right away. The price you pick is the price you renew at.

Start my free moveSee plans and prices
See pricesFree move