HomeAPI StatusFree ToolsSEO Help Articles

Page Cache Test (Server Side Caching)

The Page Cache Test focuses specifically on the HTML document's caching policy — the most subtle of all caching decisions. HTML changes more often than CSS or JS, so it cannot be cached for long, but it can be served from the CDN edge with very short TTLs and stale-while-revalidate to give near-instant response times while still propagating content updates within seconds. This test reports whether your HTML cache policy is hitting the right balance.

What This Tool Checks

  • HTML Cache-Control header values
  • stale-while-revalidate directive presence
  • ETag for conditional revalidation
  • CDN cache hit / miss status (Age header)
  • s-maxage for shared caches vs max-age for browsers
  • Cookie-based vary preventing CDN caching
  • Personalized vs anonymous response variation

Why It Matters for SEO

HTML at the edge is the holy grail of web performance. Cached HTML responses serve in 10-30 ms anywhere in the world, instead of 200-800 ms from a single origin. The trick is balancing freshness — HTML must update when content changes — with speed. stale-while-revalidate solves this elegantly: serve the cached copy instantly, then fetch a fresh one in the background for the next visitor.

How to Fix It

For anonymous HTML pages: Cache-Control: public, max-age=0, s-maxage=60, stale-while-revalidate=86400. For personalised HTML: keep no-store and accelerate via SSR / streaming. Strip session cookies from anonymous responses so the CDN can cache them. Use ETag for conditional 304s.

How It Works

We fetch the URL's HTML, inspect the cache headers, then make a second request to detect CDN cache hits via the Age header and X-Cache / CF-Cache-Status response. Cookies and personalization signals that prevent CDN caching are surfaced as separate findings.

Common Mistakes to Avoid

  • No Cache-Control on HTML (browser caches unpredictably, CDN cannot cache)
  • Cache-Control: private on every page (CDN ignores)
  • Set-Cookie on every HTML response (most CDNs skip caching when cookies are set)
  • Cache-Control: no-store on logged-out marketing pages
  • Long max-age on HTML, breaking content updates

Quick Checklist

  • Anonymous HTML cacheable at the CDN edge
  • stale-while-revalidate enabled for fast updates
  • ETag present
  • No Set-Cookie on anonymous responses
  • CDN responds with HIT on repeat requests

Frequently Asked Questions