Skip to main content
短.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.

Share on XHatena

Was this article helpful?

Related Terms

Related Articles

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