Get the latest tech news

The Chrome Speculation Rules API allows the browser to preload and prerender


Discover how to significantly boost your website's loading speed by adding just 5 lines of HTML. Simple steps for faster websites.

<script>if (!HTMLScriptElement.supports||!HTMLScriptElement.supports('speculationrules')){constpreloadedUrls={};functionpointerenterHandler(){if (!preloadedUrls[this.href]){preloadedUrls[this.href]=true;constprefetcher=document.createElement('link');prefetcher.as=prefetcher.relList.supports('prefetch')?'document':'fetch';prefetcher.rel=prefetcher.relList.supports('prefetch')? 'prefetch':'preload';prefetcher.href=this.href;document.head.appendChild(prefetcher);}}document.querySelectorAll('a[href^="/"]').forEach(item=>{item.addEventListener('pointerenter',pointerenterHandler);});}</script>

Get the Android app

Or read this on Hacker News

Read more on:

Photo of website

website

Photo of lines

lines

Photo of HTML

HTML

Related news:

News photo

AMD Kernel Graphics Driver Exceeds 5.9 Million Lines In Linux 6.16

News photo

You can create Apple wallpaper from their Saudi Arabia’s website

News photo

Do not download the app, use the website