Lesson 25 of 30
The resource-hints lesson covered prefetching static resources. The same 'fetch it before it's needed' idea, applied to data instead of assets, can make a click feel instant.
11 min read
Every option explains itself — why the right one is right, and why each wrong one is wrong. Miss one and it comes back later on a spaced-repetition schedule.
Question 1 of 3
A framework starts fetching a link's route code AND its data as soon as the user hovers over the link, before they click. Why can this make the subsequent navigation feel instant?
Hints without spoilers, and a plain explanation of why a wrong answer was wrong — answered only from this lesson. Free account, no card.
Sign up freeWhat interviewers actually ask about this, and what a strong answer has to cover.
A strong answer covers
Likely follow-ups
The resource-hints lesson covered <link rel="prefetch"> for a likely next navigation's static resources — code, mostly. This lesson extends the same underlying principle one layer further: prefetching data, not just assets. The idea doesn't change — fetch something before it's needed, so it's already available when it is — but applying it to a data fetch (an API call, a route's server data) rather than a static file is a distinct, common pattern in its own right.
Two real, widely-used triggers for when to prefetch data:
User hovers a link -> [prefetch starts: code + data] -> ~200ms hover delay -> user clicks
|
v
By click time, fetch may already be done — navigation renders from
already-resolved data instead of waiting on a fresh request.
Without prefetching, a click triggers the entire chain — route code loads, then the data fetch starts, then the page can render — all after the click, which is exactly when the user is watching and waiting. With hover-triggered prefetching, most or all of that chain already ran during the hover delay that happens naturally before most clicks anyway. The click just reveals work that's already done.
"A click into a detail page feels slow because of the API round trip after navigation — how would you make it feel instant without changing the backend?" is a real question, and naming hover-triggered data prefetching (plus the honest bandwidth tradeoff of doing it too aggressively) shows you can apply the resource-hints principle to data, not just static assets.