feat: Preload & deprioritize some fetches #1326
Merged
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.
We have a number of known static assets/fetches that we can preload to more quickly finish loading all resources, and as we're prerendering, most of this can actually be kicked down to low priority;
fetch
, by default, is high priority yet none of these are actually essential for first load.Unfortunately Chrome still doesn't support preloading SVG sprites, it'd duplicate the request which is just a net negative, but that'll be another good addition when they do.
There's some discrepancies between the live & preview envs (which I used to generate this), so not quite apples-to-apples, but not super far off either.