Hacker News new | ask | show | jobs
by andrethegiant 2686 days ago
> Prefetching is a questionable and a lot discussed feature, do you want to prefetch all the 50 links on my page?

This isn't how Next prefetches with dynamic routing. It fetches the JS required to construct the DOM of those pages, but doesn't execute it. If on one page you have three links to /gallery/a, /gallery/b, and /gallery/c, then gallery.js will be prefetched once. You can confirm this in devtools. Also, prefetching is opt-in.