Short answer
Prefetching fetches a likely next file before the click, and lazy loading waits until an off-screen image or frame is near the viewport. Use a prefetch hint, or speculation rules, for a document you expect next. Use loading=lazy for media the reader has not reached. A fast page often needs both, because the hints solve opposite timing problems. The rules below are from MDN, the HTML spec, web.dev, and Chrome, as of December 2026.
Last verified against the sources listed below.
Key takeaways
- MDN says rel=prefetch is a low-priority hint for a future same-site navigation or subresource.
- MDN advises speculation rules for document prefetches where the browser supports them.
- web.dev says loading=lazy defers an image until it nears the viewport. Eager is the default.
- Speculation-rules prefetch downloads the next document, not that page's subresources.
- Do not lazy-load the picture in the first screen. Do not prefetch every link on a large site.
Prefetching vs lazy loading is a choice about when the browser spends bandwidth. Prefetch asks for a file the reader will probably need next. Lazy loading refuses a file until it is about to enter the screen.
Page speed is the reason the choice matters. Both hints are optional. Neither one replaces a small file.
| Question | Prefetching | Lazy loading |
|---|---|---|
| Moment | Before a later navigation | When an element nears the viewport |
| Typical HTML | link rel=prefetch, or speculation rules | loading=lazy on img, iframe, video, or audio |
| What moves across the network | A future document or a same-site subresource | The off-screen element itself |
| If the reader never needs it | The bytes were wasted | The fetch often never starts |
| Default if you write nothing | The browser does not prefetch | web.dev says eager is the default for images |
What prefetching fetches before the click
The HTML spec says the prefetch keyword means that fetching and caching the resource, or a same-site document, is likely to help, because the user will probably need it. MDN’s prefetch page calls it a hint, kept in the HTTP cache on disk, and functionally close to a low-priority fetch.
MDN also says certain Cache-Control headers, including no-store, can block that classic hint. The request carries Sec-Purpose: prefetch. A server can change cache behavior when it sees that header. The current page still outranks the next one, so prefetch stays below preload in priority.
For a whole document, MDN advises the Speculation Rules API where the browser supports it. A script of type speculationrules, with a prefetch action, downloads the next document’s response body and not the subresources that page points at. The result sits in a per-document memory cache and is dropped when you leave, except for the document you actually open.
Chrome’s prerender guide describes the same API as the way a site tells Chrome which pages to prepare. Prerender is the stronger cousin: it loads the document, runs script, and keeps a hidden page. Prefetch stops at the document response. Use prerender only for a navigation you are very sure about, because it costs more.
Cross-site speculation prefetch is limited. MDN says it currently runs only when the destination has no cookies for that user. Same-site link prefetch does not get that cross-site exception. Subresources still use the link element, and speculation rules do not prefetch them.
What lazy loading holds until the scroll
MDN’s lazy-loading guide defines the strategy as marking a resource non-critical and loading it only when needed. The usual moment is scroll or a later navigation. The goal is a shorter critical rendering path.
The loading attribute is the browser feature for that wait. MDN shows it on img, iframe, video, and audio. web.dev’s image article says lazy defers the resource until it reaches a calculated distance from the viewport. Eager is the default, the same as omitting the attribute, and it loads the image wherever it sits.
That default is the practical rule. A logo or a hero should stay eager. A gallery below the fold can be lazy. web.dev notes that images below the viewport are already a lower priority, and lazy goes further by not fetching them during the first load.
MDN warns that the load event can fire before lazy images inside the viewport have arrived. Do not treat that event as proof that every picture is on screen. A lazy video in MDN’s example includes controls. Without a displayed box, the near-viewport check never starts.
Angular apps meet the same early-versus-late choice when a route’s code can wait. That framework case is covered in lazy loading versus eager loading in Angular. The HTML attribute on an image is a separate switch.
Where the two hints differ
Prefetch spends bytes now to save time later. Lazy loading refuses bytes now so the first paint stays smaller. One is optimism about the next click. The other is skepticism about content the reader may never reach.
They attach to different elements. Prefetch is a link relationship or a speculation-rules script, while lazy loading is an attribute on a replaced element. Putting loading=lazy on a link does not prefetch the next article. Putting rel=prefetch on an img does not defer that image.
The failure modes differ too. A bad prefetch wastes a download and can fill the cache with a page nobody opens. A bad lazy load delays the first thing the reader sees, which feels slower even if the total transfer is smaller. MDN’s speculation-rules note is the middle path for documents: the upfront cost of a prefetch is much smaller than a prerender, so a broad prefetch of safe pages is encouraged, while a prerender should stay narrow.
Battery Saver and Data Saver are another split. MDN says speculation-rules prefetch respects those settings. A hand-written fetch with low priority does not lower itself the same way. If you only add link rel=prefetch, you also miss that automatic backoff.
| Mistake | What goes wrong | What to write instead |
|---|---|---|
| loading=lazy on the hero | The first screen waits on a deferred image | Omit the attribute, or set eager |
| Prefetch on every footer link | Many unused downloads | Prefetch one likely next document |
| rel=prefetch for a cross-site article | Classic prefetch is a same-site hint | Speculation rules, if cookies allow it |
| Prerender of a page with prompts | Chrome may cancel intrusive work in the hidden page | Prefetch the document instead |
| Assuming the load event means images are done | Lazy images can still be pending | Do not block UI on that event |
Which to choose when
Choose lazy loading when the file is on this page and below the first screen. Product photos, comments, embeds, and late video are the usual list. Leave the first screen on the default eager behavior web.dev describes.
Choose prefetching when you know the next URL. A multi-step form, a “next article” link, or the logged-in app shell from a marketing page are fair targets. Prefer speculation rules for the document itself. Keep link rel=prefetch for a same-site script or stylesheet the next page will need.
Use both on a long article that also links onward. Lazy-load the figures in the body, and prefetch the next chapter if most readers continue. Do not prefetch the next chapter’s images as well unless you have measured that readers open it. The document prefetch already skips those subresources.
Skip both when the page is one screen and one destination. Extra hints add markup without a wait to remove. Compress the file first so either strategy moves fewer bytes. An image compressor is the step before the hint, not a replacement for it.
If a framework already splits routes, keep that split, and still set loading on the images inside the route. The network hint and the bundle split answer different delays. Neither one fixes a file that is simply too large.
Frequently asked questions
Is prefetching the same hint as preload?
No. This comparison is about fetching early for a later navigation, versus waiting to fetch something still off screen. Preload is a separate hint aimed at a file the current page needs soon. MDN treats prefetch as lower priority than preload, because the current page matters more than the next one. Mixing the two names in one link tag does not make a single behavior. Pick the hint that matches the moment you need the bytes.
Does loading=lazy work on video and audio?
MDN's lazy-loading guide lists the loading attribute on img, iframe, video, and audio. The point is the same for each: defer a resource that is off screen until the reader scrolls near it. A lazy video still needs a controls attribute in the example MDN shows, because without controls the element is not displayed and the near-viewport check has nothing to watch. Iframes need a title for the same reason any iframe needs a name.
Will the browser always honor a prefetch?
No. MDN describes prefetch as a hint, not a command. Speculation rules go further and skip prefetching when the device is in Battery Saver or Data Saver mode. A Cache-Control value such as no-store can also block a classic link prefetch, which is one reason MDN prefers speculation rules for document prefetches where they exist. If the reader never opens the URL, those bytes were spent for nothing.
Can I prefetch a page on another site?
A classic link rel=prefetch is for same-site documents and for subresources used by same-site pages, per MDN. Speculation rules can prefetch cross-site navigations, with a privacy limit: MDN says a cross-site prefetch currently works only when the user has no cookies set for the destination. That limit exists so a site cannot track someone through a page they never visit. Subresource prefetch still belongs on the link element.
Should every image on a long page be lazy?
No. web.dev says eager, the default, loads an image no matter where it sits. Lazy waits until the image reaches a calculated distance from the viewport. The hero, the logo, and any picture in the first screen should stay eager, or simply omit the attribute. Images below the fold are the ones that benefit. Lazy-loading the first screen delays the thing the reader sees immediately.
Sources
- rel=prefetch · MDN, 2026
- Lazy loading · MDN, 2026
- Speculation Rules API · MDN, 2026
- HTML living standard, link types · WHATWG, 2026
- Browser-level image lazy loading · web.dev, 2026
- Prerender pages in Chrome · Chrome for Developers, 2026