Check the documentation at https://developer.chrome.com/docs/web-platform/prerender-pages#speculation-rules-api
Open index.html
and add the following code to the <head>
:
<script type="speculationrules">
{
"prerender": [
{
"urls": ["fish-tacos", "vegetatian-pho.html"]
}
]
}
</script>