Summary
Browser/speculation rules prerender likely next page — instant navigation when correct, wasted bandwidth/CPU when wrong. <link rel="prefetch"> vs Speculation Rules API vs Next.js <Link prefetch>. Privacy and auth pages must opt out — prerendering authenticated routes leaks data.
Code example
<script type="speculationrules">
{
"prerender": [{ "source": "list", "urls": ["/checkout", "/pricing"] }]
}
</script>
Key points
- Browser/speculation rules prerender likely next page — instant navigation when correct, wasted bandwidth/CPU when wrong.
<link rel="prefetch">vs Speculation Rules API vs Next.js<Link prefetch>.- Privacy and auth pages must opt out — prerendering authenticated routes leaks data.