Skip to content

Fix stale cached assets disabling the quote form - #41

Merged
dexsword merged 1 commit into
mainfrom
fix/version-static-assets
Sep 8, 2026
Merged

Fix stale cached assets disabling the quote form#41
dexsword merged 1 commit into
mainfrom
fix/version-static-assets

Conversation

@dexsword

@dexsword dexsword commented Sep 8, 2026

Copy link
Copy Markdown
Owner

After an HTML release, Cloudflare can continue serving the previous script.js and style.css for four hours. On the live PR #40 release, this left the new quote form without its JavaScript handler. The public script was 16,526 bytes while the deployed script was 18,439 bytes; the versioned URL returned the current asset.

Add content-derived query versions to shared script and stylesheet references on every public page. npm run assets:version updates those references after an asset edit, and a regression test rejects missing or stale versions. No dependencies, runtime filenames, server configuration, or deployment gates change.

Validation: all 127 application tests pass. Live Chromium checks with versioned asset requests pass at 390px and 1440px for the homepage and all four service pages, including booking date/time selection and quote-form error handling. Test form requests were intercepted; no live email or booking was created. JavaScript syntax, tracked-file guard, and diff checks pass.

The normal protected deployment publishes this fix; no additional operator installation is required. Until then, purging only https://dextech.cloud/script.js and https://dextech.cloud/style.css from Cloudflare can refresh the stale edge copies, though clients with an existing browser cache may still need a hard refresh.

@dexsword
dexsword marked this pull request as ready for review September 8, 2026 19:12
@dexsword
dexsword merged commit fb8d3da into main Sep 8, 2026
13 checks passed
@dexsword
dexsword deleted the fix/version-static-assets branch September 8, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant