Users See Broken Old JS Bundle After Static Deployment

HTML `index.html` was cached with long `max-age`, referencing deleted hashed JS chunks.

Runs locally in browser Free · No login Independently Verified 2026-11-25 v4.1.0
Identifier: Users See Broken Old JS Bundle After Static Deployment Platform: HTTP
Common Root Causes:
  • HTML `index.html` was cached with long `max-age`, referencing deleted hashed JS chunks.

Interactive Diagnostic Checklist

Verified Solutions:
  1. Serve HTML with `Cache-Control: public, max-age=300, must-revalidate` and content-hashed assets with `immutable`.
Safe Diagnostic Command:
curl -sI https://<domain>/ | grep -i cache-control
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.

Technical Explanation

HTML `index.html` was cached with long `max-age`, referencing deleted hashed JS chunks. Recommended diagnostic: `curl -sI https://<domain>/ | grep -i cache-control`. Remediation: Serve HTML with `Cache-Control: public, max-age=300, must-revalidate` and content-hashed assets with `immutable`.

Worked Examples

  • Run `curl -sI https://<domain>/ | grep -i cache-control` to verify root cause before applying the remediation.

Limitations & Assumptions

  • Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.

Source References & Verification

Resource ID: err-http-cache-control-stale-deploy · Independently verified: 2026-11-25

Related Resources