vercel / next.js

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

use fetch priority for app prefetches #67356

Closed ztanner closed 3 months ago

ztanner commented 3 months ago

This leverages fetch priority to ensure automatic prefetching as a result of visiting a page is sent with "low" priority, to signal to the browser it can prioritize more important work necessary for rendering the page.

A "temporary" prefetch (ie one that is created when there wasn't an existing prefetch cache entry on navigation) will use a "high" priority because it's critical to the navigation event.

All other cases will be "auto" which is the current default.

ztanner commented 3 months ago

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @ztanner and the rest of your teammates on Graphite Graphite

ijjk commented 3 months ago

Tests Passed