A page still looks stale after deployment

Identify which layer served an old representation and validate the cache key and freshness evidence.

  • caching
  • cdn
  • diagnostics

Diagnostic overview

Symptoms

  • A recently deployed page still shows an older representation.
  • Different clients receive different representation versions.

Likely layers

browser cache, shared cache, cdn, origin

Common causes

  • A browser cache reuses a stored response that is still fresh.
  • A shared cache or CDN key does not vary on the expected request properties.
  • The deployment changed one origin while traffic reaches another.

Diagnostic steps

  1. Record the response status and cache-related fields from the affected client.

    Look for: Age, Cache-Control, ETag, Last-Modified, Via, and vendor cache fields can identify reuse and the serving layer.

  2. Repeat with a controlled client while preserving the original URL and request fields.

    Look for: A different result separates browser-local state from a shared path without immediately purging anything.

  3. Compare the cache key inputs and selected origin for both requests.

    Look for: Host, path, query, method, and configured variance explain why two requests may not share an object.

Targeted fixes

  • Correct the responsible cache policy or key rather than disabling caching globally.
  • Purge only the affected object when an urgent stale representation is confirmed.
  • Deploy a new versioned asset URL when immutable caching is intentional.

Start with the response you actually received

Capture the complete response fields from the affected client. Do not begin by purging every cache: that removes evidence and can hide an incorrect cache key or origin route.

curl --silent --show-error --dump-header - --output /dev/null https://example.invalid/page

Expected result: the output contains the response status and fields needed to compare freshness, validation, age, and intermediary behavior. The reserved .invalid host is illustrative; replace it only with a destination you control or are authorized to test.

Locate the serving layer

Compare the affected browser, a clean browser profile, and a controlled command-line request. Preserve the URL and meaningful request fields. A changing result is evidence about path or client state, not proof that one named cache is wrong.

Fix the narrow cause

Once the responsible layer is known, correct its policy, cache key, origin selection, or deployment mapping. Use a targeted purge for urgent incorrect content. Version assets that are intentionally immutable instead of repeatedly purging them.

Primary sources