Speed up navigation: no redirects, CDN cache, lazy search index - #499
Merged
Merged
Conversation
Netlify serves pages at /path/ and answers /path with a 301, so every internal link without a slash cost a second round trip on click. An inspector normalizes them in the built HTML; the navbar data follows.
Every response was private, max-age=0, so Cloudflare bypassed its cache and browsers revalidated each asset on every visit. Pages stay revalidated on each request; the fingerprinted bundles and fonts under /docs/_bridgetown/static are immutable.
The script filled CSS_PATH and JS_PATH placeholders from asset paths that no longer exist, leaving an empty Link preload header on the home. The stylesheet and the font are already preloaded from the page head.
The results element fetched the 400 KB index and built the lunr index every time it connected, that is on every Turbo visit, blocking the main thread right after each navigation. The index now loads on the first focus and is shared by both search fields for the whole session.
✅ Deploy Preview for bump-content-hub ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Member
Author
|
@grossyoan : we'll only see the real cache improvement in production, the previous URL doesn't go through our *.bump.sh domain (= no Cloudflare cache). |
grossyoan
approved these changes
Sep 28, 2026
Contributor
Noted! Nav, search, etc still work, that's what I tried 🙏 |
fbraure
approved these changes
Sep 28, 2026
fbraure
left a comment
Contributor
There was a problem hiding this comment.
LGTM, that's nice optimizations here ! Thanks 🙏🏻
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.
Clicking an internal link on docs.bump.sh took about 800 ms. Three causes, fixed here:
private, max-age=0, so Cloudflare bypassed its cache and browsers revalidated each asset on each visit. Pages are nowpublicand revalidated, fingerprinted assets are immutable for a year. The deadbin/netlify.shpost-build script and its broken preload header go away.