Skip to main content
miji.be

Prerendering

An optimization technique that fully renders a page in the background before the user clicks a link, making the subsequent navigation appear instant.

Aug 24, 2026 / About 2 min read

Redirect

Prerendering is an optimization technique in which the browser renders an entire page (parsing HTML, applying CSS, executing JavaScript) in the background before the user actually navigates to it. When the link is clicked, the already-rendered page is swapped in with almost no waiting. Prerendering is only a hint, however, and the browser may decline it depending on memory pressure or user settings.

Chrome supports prerendering through the Speculation Rules API. By adding a <script type="speculationrules"> block to the HTML and specifying URL patterns, the site itself declares which URLs are candidates rather than leaving the choice to browser prediction. The eagerness setting decides when a candidate fires: immediate acts as soon as the rules are parsed, eager and moderate act when the pointer rests on the link, and conservative waits for the pointer or touch to go down. The eagerness field requires Chrome 121 or later.

For shortened URLs, the first thing to establish is how far prerendering can reach. Normally, clicking a short link triggers DNS resolution, a TCP connection, a redirect response, another DNS resolution for the destination, and finally the page load. Speculation Rules prerendering, however, is limited to same-origin documents by default; a different origin works only when it belongs to the same site and the destination opts in with the Supports-Loading-Mode header. Cross-site prerendering is not performed at all, and a prerendering page that tries to navigate to another site is discarded before the request is sent. Because a short link usually sits on one site and points to another, prerendering cannot be used to complete those steps in advance. Its practical scope is navigation inside your own site; to speed up a redirect that leaves the site, the lighter measures described below are the realistic options.

The trade-off is resource consumption. Prerendering downloads and executes the full page in the background, consuming bandwidth and device memory. On mobile connections this can be costly, so prerendering should target only high-confidence links. Chrome also caps how many prerenders it keeps at once, at 10 for immediate and 2 for the other eagerness levels, discarding the oldest beyond that. Speculative loading is skipped entirely when Save-Data is set, when battery saver is on, when memory is constrained, or when page preloading is turned off in the browser.

Lighter alternatives exist on a spectrum: dns-prefetch (DNS resolution only), preconnect (DNS + TCP + TLS), and prefetch (resource download without rendering). Choose the level that balances resource cost against perceived speed gain. These three also work across origins, which makes them the practical choice for links that send visitors to an external site. Note that the older <link rel="prerender"> hint is deprecated: in current Chrome it no longer renders a full page and behaves closer to a resource prefetch. Page-level speculation has moved to the Speculation Rules API.

Was this article helpful?

Related Terms

DNS Prefetch

A browser optimization that resolves link destination domain names in advance. Reduces page load time when a user clicks a link.

Page Speed

A measure of how quickly a web page loads and becomes interactive, affecting both user experience and search rankings.

Cache

A temporary storage mechanism that saves previously fetched data for faster subsequent access. Browser cache and DNS cache are common examples.

CDN

A network of geographically distributed servers that deliver web content from the location nearest to the user. Improves speed and reliability.

Core Web Vitals

A set of Google-defined metrics measuring real-world user experience for loading performance, interactivity, and visual stability.

Link Prefetch

A browser feature that fetches the resources of a link destination in advance in the background before the user clicks. It can reduce the wait time of page transitions in some cases.

Related Articles

How Redirect Chains Impact Web Performance - Speed Optimization for Short URLs

Quantitative analysis of how short URL redirect chains affect Core Web Vitals and page load speed. Covers redirect hop optimization, edge redirects, and HTTP status code selection for maximum performance.

What Happens When You Click a Link? A Peek Behind the 0.5-Second Curtain

What happens behind the scenes when you click a link? An adventure-style guide covering DNS, requests, responses, and how URL shortener redirects work.

How URL Shorteners Work - The Technical Side of Redirects

Discover the technical mechanics behind URL shortening: hash generation, database lookups, HTTP redirects, and more. Includes HTTP response examples and base-62 encoding calculations.

FAQ

What is the difference between prerendering and prefetch?
Prefetch only downloads resources (HTML, CSS, JS, images). Prerendering goes further by parsing the HTML, applying CSS, and executing JavaScript in advance. Prerendering delivers a bigger speed gain but consumes more resources.
Does prerendering work in all browsers?
The Speculation Rules API is supported in Chrome 109 and later. As of August 2026, Firefox does not support it and Safari does not enable it by default. In unsupported browsers the page loads normally as a fallback.
Does prerendering increase data usage?
Yes, pages that are prerendered but never visited still consume bandwidth. The browser itself skips speculative loading when Save-Data is set, when battery saver is on, or when memory is constrained. What a site can do is limit the rules to high-confidence links and choose a restrained eagerness value.

Put the terms to work

Shorten a URL for Free