Deduplicate SSR preload links #32736
Unanswered
aaronadamsCA
asked this question in
Ideas / Feature Requests
Replies: 1 comment 1 reply
-
Hi Aaron, I have the same issue with many duplicate preloads. www.lucidmotors.com |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
<link as="fetch" rel="preload" .../>
entries in the<head>
of SSR pages should be de-duplicated to reduce HTML payload size.(There's a chance this is causing iOS errors and/or log noise, which is how I noticed the duplication; I'm getting intermittent
Unexpected end of JSON input
errors in Sentry that seem to indicate JSON files are being parsed before they're downloaded. Wondering aloud if duplicatepreload
requests could trigger undefined Safari race condition behaviour.)Basic example
https://www.nishe.shop/ view source snippet shows two duplicate pairs of preload requests:
I believe it's because multiple components on the page use the same static query hooks. Ideally this would be de-duplicated, since (a) reusable hooks are good and (b) smaller SSR pages are good.
Beta Was this translation helpful? Give feedback.
All reactions