根据instant.page官网的解释:
一般情况下,在用户点击链接之前,他们会将鼠标悬停在该链接上。
当用户悬停 65 毫秒时,有二分之一的机会点击该链接,因此 instant.page 此时开始预加载,页面预加载平均留出 300 多毫秒。
另一种选择是在用户开始按下鼠标而不预加载时加载页面。这使得未使用的请求为零,同时仍将页面加载平均提高了 80 毫秒。您还可以在悬停时或在链接可见时立即预加载,并在用户开始按下鼠标时触发点击,从而使您的页面成为世界上最快的页面。
使用
根据官网的提示,将这段HTML片段放在</body>
之前即可
<script src="//instant.page/5.1.1" type="module" integrity="sha384-MWfCL6g1OTGsbSwfuMHc8+8J2u71/LA8dzlIN3ycajckxuZZmF+DNjdm7O6H3PSq"></script>
添加之后能明显感知到网站页面切换有些许的流畅,尤其是我加了很多表情的留言界面,清除缓存重新切换加载速度在感知上很快
instant.page 官网:https://instant.page/
instant.page Github:instantpage/instant.page
Have youu ever considered about adding a little biit morde than just
your articles? I mean, what you saay is important and everything.
Nevertheless think of iif youu addced ssome ggreat photos or video clips too gijve
your pots more, "pop"! Your content iis excellent buut with imagrs and clips, this webgsite could definitely be oone
oof the bestt in itss niche. Superb blog!
Charlie 03-03
Thank you for your feedback. I will carefully consider and continue to improve in order to provide readers with a better reading experience.
English is not my native language; please excuse typing errors.
Jerry 03-03 回复 @Charlie