vercel / next.js

The React Framework
https://nextjs.org
MIT License
122.91k stars 26.28k forks source link

prefetch fetches should be priority: low #67353

Closed agadzik closed 4 days ago

agadzik commented 4 days ago

What?

Any page with a large number of prefetched links are congesting the network because prefetch fetches have a priority set to high. This blocks any client-side navigation when that navigation was initiated before the page had time to fetch all of its resources / prefetches.

This change sets the fetch priority to low for any prefetch mechanism and defaults to high otherwise (when there's no prefetch) set.

ijjk commented 4 days ago

Allow CI Workflow Run

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer