feat: Speculation Rules API in BaseLayout (prerender on hover/pointerdown)
All checks were successful
deploy / deploy (push) Successful in 1m10s

This commit is contained in:
striker
2026-05-23 23:56:41 +03:00
parent 3104eaf1ce
commit 98c91f605b

View File

@@ -77,6 +77,29 @@ const jsonLd = {
<script type="application/ld+json" is:inline set:html={JSON.stringify(jsonLd)} /> <script type="application/ld+json" is:inline set:html={JSON.stringify(jsonLd)} />
<!--
Speculation Rules API (Chromium 122+) — prerender same-origin pages on
hover/pointerdown for near-instant navigation.
-->
<script type="speculationrules" is:inline set:html={JSON.stringify({
prerender: [
{
where: {
and: [
{ href_matches: '/*' },
{ not: { href_matches: '/assets/*' } },
{ not: { href_matches: '/uploads/*' } },
{ not: { href_matches: '/api/*' } },
{ not: { href_matches: '/sitemap*' } },
{ not: { href_matches: '/feed*' } },
{ not: { href_matches: '/llms*' } }
]
},
eagerness: 'moderate'
}
]
})} />
<Analytics /> <Analytics />
</head> </head>
<body> <body>