Link Prefetching

Link prefetching is a browser technique that fetches a page or file before the user clicks, so the next navigation loads faster. The browser requests the target URL in the background and stores the response in its cache. Because the request happens before any human action, a prefetch can register as a click on the server even though nobody visited.
Why Link Prefetching Matters
Prefetching trades a little bandwidth for speed. When the guess is right, the next page appears almost instantly. When the guess is wrong, the browser has made a request that no person intended.
That second case is the measurement problem. A server, or a redirect-based link tracker, counts HTTP requests. It cannot tell a prefetch from a visit unless the request is labelled. The result is click counts that run higher than real human clicks. The full picture of how this breaks click data is covered in why click counts do not match sessions.
Link Prefetching vs Preloading vs Prerendering
The terms are often mixed up. The key difference is which page the resource is for.
| Technique | Targets | What it does |
|---|---|---|
dns-prefetch |
An origin | Performs only the DNS lookup early |
preconnect |
An origin | Performs DNS, TCP and TLS early |
preload |
The current page | Fetches a high-priority resource the page needs very soon |
prefetch |
A future navigation | Fetches a resource at low priority and keeps it in the HTTP cache |
| Prerender (Speculation Rules) | A future navigation | Fetches, renders and runs the page in a hidden tab |
Link preloading, in the strict sense, is preload. MDN describes it as declaring resources the current page “will need very soon”. It does not execute a script, it only downloads and caches it at higher priority. Link prefetching is for later pages. Browser prefetching and URL prefetching are the same idea described from different angles.
The older <link rel="prerender"> is deprecated and no longer prerenders.
How Link Prefetching Works
A page can request a prefetch with one line of HTML:
<link rel="prefetch" href="/pricing" />
For whole documents, MDN recommends the newer Speculation Rules API instead:
<script type="speculationrules">
{
"prefetch": [
{ "urls": ["/pricing", "/features"] }
]
}
</script>
A prefetch downloads the response body only, not the page’s subresources. A prerender goes further and loads everything, including running JavaScript.
Prefetching is not always the site’s choice. Chrome also guesses from the address bar. Its documentation says Chrome preconnects when prediction confidence is above 30% and prerenders the URL above 50%. Chrome blocks these speculations when its “Preload pages” setting is off.
Prefetch has limits. A Cache-Control: no-store or no-cache response can block it, and browsers that partition their cache make cross-site prefetches unusable.
Link Preview Bots
Link preview bots are a different source of requests that look like clicks. When someone posts a link in a chat or social app, the platform sends a bot to fetch the page and build a preview card.
Slack documents its bot as Slackbot-LinkExpanding. It fetches the page when a user posts a link, reads oEmbed, Twitter Card and Open Graph tags, and caches the result for about 30 minutes. Slack states that it does not honor robots.txt. Meta’s crawler, facebookexternalhit, runs when a link is shared and reads Open Graph data the same way.
These bots are not prefetching, since no navigation is planned. They still produce a server hit per shared link. How a link preview is built from those tags is a separate topic.
How to Detect Prefetch and Preview Requests
Most of these requests can be spotted, though not all.
- Check the
Sec-Purposeheader. Browsers label prefetch requests withSec-Purpose: prefetch. MDN notes a server can use it to treat the request differently “when counting page visits”. - Check for the prerender value. Prerender requests carry
Sec-Purpose: prefetch;prerender. - Match known preview bot user agents. Look for
Slackbot-LinkExpandingandfacebookexternalhit, among others. - Keep side effects off plain GET URLs. MDN warns that prefetching a sign-out, add-to-cart or ad conversion URL can trigger the action early.
- Defer analytics on prerendered pages. Wait for the
prerenderingchangeevent whendocument.prerenderingis true.
GET /pricing HTTP/1.1
Host: example.com
Sec-Purpose: prefetch
Sec-Fetch-Dest: empty
Treat the header as a hint. It is set by the browser, and its absence does not prove a human clicked. For ad campaigns, the wider question of which non-human requests to filter is covered under invalid traffic.
Frequently Asked Questions
Does link prefetching count as a click?
It can. A server or redirect-based tracker counts any HTTP request, and a prefetch is a real request made before the user acts. Whether it appears as a click depends on whether the tool filters prefetch requests, for example by reading theSec-Purpose header. Compare click totals against sessions to see how large the gap is.
Is link prefetching the same as link preloading?
No. Preloading fetches resources the current page needs right away, at high priority. Prefetching fetches resources for a future navigation, at low priority. The two attributes arerel="preload and rel="prefetch.
Do link preview bots count as clicks?
They can. A preview bot requests the page when a link is posted, so a tracker that records every request will log it. Slack’s bot and Meta’sfacebookexternalhit both do this. Filtering by user agent removes the known ones.
How do I stop link prefetching?
Visitors can switch off Chrome’s “Preload pages” setting. Site owners can remove therel="prefetch tags or speculation rules, or send Cache-Control: no-store on pages that must not be cached. Neither option affects preview bots, which fetch on a user’s share.
What does link prefetching mean for site speed?
Prefetching shortens the next navigation when the browser guessed correctly, because the response is already cached. A wrong guess wastes bandwidth. MDN notes the cost is low for prefetch and higher for prerender, so prerendering is used more sparingly.To check how much of your own click data is automated, follow the click-to-session method in this click analytics guide.