
Description
prefetch is an agent skill that teaches resource prefetching, a browser technique for making the next page load faster. Prefetching fetches resources that may be needed for later routes or pages before the user asks for them, which reduces the perceived wait on later navigations. The skill lists the ways to set it up: declaratively in HTML with a link element whose rel is prefetch, through an HTTP Link header, through service workers, or through custom tooling such as Webpack. It explains when to use prefetch, which is when you can predict what users will need next. It also explains when not to use it: for resources that are unlikely to be needed, on low-bandwidth or metered connections where a data budget matters, and for resources that change often and would be stale by the time they are used. The skill is part of the patternsdev skills repository and installs with the skills CLI. Use it when a request is about speeding up navigation or deciding what to load ahead of time.…
Highlights
- Explains prefetching for faster next-page navigations
- Covers HTML, HTTP Link header, service worker and Webpack setups
- Lists when prefetch wastes bandwidth
- Includes when-to-use and when-not-to-use guidance
Ratings & Reviews
No ratings yet
Be the first to rate prefetch.
People also visit

next-partial-prefetching-optimizer
Optimize what selected Next.js client navigations include before the click under
prefetch FAQ
What is prefetch?
A browser technique that loads resources needed for later routes before the user navigates to them.
Who is it for?
Front end developers working on page load and navigation speed.
What are the ways to set it up?
Declaratively in HTML, with an HTTP Link header, through service workers, or with custom tooling such as Webpack.
When should I avoid it?
For resources users are unlikely to need, on metered or low-bandwidth connections, and for resources that change often.
How do I install it?
Run npx skills add https://github.com/patternsdev/skills --skill prefetch.
What are the best prefetch alternatives?
Popular alternatives to prefetch include preload, next-partial-prefetching-optimizer and next-partial-prefetching-adoption. See all prefetch alternatives







