Boost Page Load Speed with 6 Lines of HTML (Chrome Speculation Rules API)
Add a <script type="speculationrules"> block in your HTML <head> to let Chrome prerender likely next pages in the background.
This makes navigation feel almost instant when a user clicks a link.
Works in Chrome 121+ (ignored safely in other browsers).
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Your App</title>
<!-- ⚡ Faster navigation with Chrome Speculation Rules -->
<script type="speculationrules">
{
"prerender": [{ "source": "document", "eagerness": "moderate" }]
}
</script>
</head>
<body>
<h1>Hello, world!</h1>
</body>
</html>