Instant.page 简介
Instant.page 使用即时预加载,即在用户单击页面之前预加载页面。
项目地址:https://github.com/instantpage/instant.page
Instant.page 效果演示
当鼠标在左侧文章链接悬停超过 65ms 后,右侧 Network 即会对文章页面进行预加载。而悬停未超过 65ms 及悬停为其他站外链接时,则不会进行预加载。
Instant.page 如何使用?
将脚本代码添加到网站的
Instant.page 使用即时预加载,即在用户单击页面之前预加载页面。
项目地址:https://github.com/instantpage/instant.page
当鼠标在左侧文章链接悬停超过 65ms 后,右侧 Network 即会对文章页面进行预加载。而悬停未超过 65ms 及悬停为其他站外链接时,则不会进行预加载。
将脚本代码添加到网站的
标签之前即可
官方脚本:
<script src="//instant.page/5.1.1" type="module" integrity="sha384-MWfCL6g1OTGsbSwfuMHc8+8J2u71/LA8dzlIN3ycajckxuZZmF+DNjdm7O6H3PSq"></script>
bootcdn 加速:
<script type="module" src="https://cdn.bootcss.com/instant.page/3.0.0/instantpage.js"></script>
脚本源代码
打开 Chrome - 开发者工具,或其他带浏览器开发者工具,如上图;
鼠标移到任意文章链接,即可查看 instantpage.js
是否发起网页预加载行为;
上图中红色框住部分,即代表该页面由 instantpage.js
发起;
未生效问题请查看官方文档:https://instant.page/blacklist