Feature request: Allow emitting preloads for page data and chunks #37700
Unanswered
iamakulov
asked this question in
Ideas / Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Background
In #35408, Gatsby made a decision to remove
<link rel="preload">
s for page data and JS chunks. That change was made to improve LCP.Unfortunately, the consequence of that change is that now, JS loads in a three-step waterfall:
(Step 1: the Gatsby bundle. Step 2: the page data. Step 3: the page chunks.)
Only after all three roundtrips complete, the page becomes interactive, and stuff like hamburger menus starts working.
Request
I’m a web performance engineer. A client of mine has a site with interactive elements where the later hydration happens, the longer the site stays non-functional. This worsens the UX more than it’s improved by the slight LCP win.
Bringing back preloading would remove the waterfall and solve this issue.
Would Gatsby consider bringing back preloading? I understand not every site has to be interactive ASAP – most sites are static. So I’m happy if this is brought as a flag (or even as an appropriate plugin API).
Beta Was this translation helpful? Give feedback.
All reactions