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.

Dec 2, 2025 · About 1 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 appears instantly, creating a perceived zero-second page transition.

Chrome supports prerendering through the Speculation Rules API. By adding a <script type="speculationrules"> block to the HTML and specifying URL patterns, developers can instruct Chrome to prerender pages the user is likely to visit next.

Prerendering can dramatically improve the redirect experience of shortened URLs. 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. With prerendering, all of these steps complete in advance, so the page appears the moment the user clicks.

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.

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. You can find related books on Amazon.

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. Firefox and Safari do not support it as of now. 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. To respect mobile users, disable prerendering when the Save-Data header is present.

Ready to create a short URL?

Shorten a URL for Free