Fix stale cached assets disabling the quote form - #41
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After an HTML release, Cloudflare can continue serving the previous
script.jsandstyle.cssfor 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:versionupdates 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.jsandhttps://dextech.cloud/style.cssfrom Cloudflare can refresh the stale edge copies, though clients with an existing browser cache may still need a hard refresh.