next.js
39c7aded - [Segment Cache] Prioritize hovered links (#74672)

Commit
1 year ago
[Segment Cache] Prioritize hovered links (#74672) This adds a new internal priority level to the prefetch queue for links that are hovered or touched. The idea is that if a user hovers over a link, they're much more likely to click on it. The elevated priority is added on mouseenter/touchstart. It is _not_ removed on mouseleave/touchend, because even though the user left the link without navigating to it, the link is still more likely to be navigated to than a link that was never hovered at all. Because the prefetch queue is last-in-first-out, the highest priority link is whichever link was most recently hovered.
Author
Parents
Loading