Open
Description
Clear and concise description of the problem
Currenly the shouldPrefetch: true
default behavior have serious preformance impact on large sites with FCP time.
For a large site with around 1500 pages, shouldPrefetch link can take up to 30-50KB in each html entry.
Suggested solution
As @meteorlxy suggests earlier, we can change the default behavior to only prefetch assets which can be visited through the page.
Or more detailed:
- find all links in the page, (also home and 404)
- find all links in navbar and sidebar
- Combine them together with a link array
- Get all the preload links of them
- filter the duplicated ones
- Set them as default value of
shouldPretch
But this requires improvments mentioned in #952
Alternative
No response
Additional context
No response