当前位置:网站首页>link preload prefetch
link preload prefetch
2022-07-03 17:30:00 【Flying bear blablabla】
link rel attribute preloadprefetch difference
Use
<link rel="preload" href="xxx" as="xxx"><link rel="prefetch" href="xxx" as="xxx">
Test method
With the help of console.time()console.timEnd() timing , computing time
<script>
console.time('a');
console.time('b')
....
....
window.onload = () => {
console.timeEnd('a');
console.timeEnd('b')
}
</script>
result
Neither of them will block onload event ,prefetch It will be loaded when the page is idle , It is the resources that may be used after preloading in advance , Not necessarily what the current page uses ,preload Preloading is the resources of the current page , When load after , This resource has not been referenced , Will prompt , Same as js async defer In addition to preloading , It just won't block onload event
author :lxts
link :https://www.jianshu.com/p/3ab0e0715e76
source : Simple books
The copyright belongs to the author . Commercial reprint please contact the author for authorization , Non-commercial reprint please indicate the source .
边栏推荐
- Electronic technology 20th autumn "Introduction to machine manufacturing" online assignment 3 [standard answer]
- 【RT-Thread】nxp rt10xx 设备驱动框架之--Audio搭建和使用
- kubernetes资源对象介绍及常用命令(五)-(NFS&PV&PVC)
- [mathematical logic] equivalent calculus and reasoning calculus of predicate logic (individual word | predicate | quantifier | predicate logic formula | two basic formulas | proposition symbolization
- [combinatorics] recursive equation (solution of linear non-homogeneous recursive equation with constant coefficients | standard form and general solution of recursive equation | proof of general solut
- Is AI too slow to design pictures and draw illustrations? 3 sets of practical brushes to save you
- First day of rhcsa study
- Hongmeng third training
- IntelliJ 2021.3 short command line when running applications
- Leetcode13. Roman numeral to integer (three solutions)
猜你喜欢

IntelliJ 2021.3 short command line when running applications

Hongmeng fourth training

【RT-Thread】nxp rt10xx 设备驱动框架之--Audio搭建和使用

vs2013已阻止安装程序,需安装IE10

Play with fancy special effects. This AE super kit is for you

【JokerのZYNQ7020】DDS_ Compiler。

Kubernetes resource object introduction and common commands (III)

Test your trained model
![[RT thread] NXP rt10xx device driver framework -- Audio construction and use](/img/85/32a83eaa4b7f5b30d4d7c4f4c32791.png)
[RT thread] NXP rt10xx device driver framework -- Audio construction and use

Design e-commerce spike
随机推荐
Free data | new library online | cnopendata complete data of China's insurance intermediary outlets
[RT thread] construction and use of --hwtimer of NXP rt10xx device driver framework
Simple configuration of postfix server
Leetcode Valentine's Day Special - looking for a single dog
RedHat 6.2 配置 Zabbix
Rsync remote synchronization
新库上线 | CnOpenData中国保险机构网点全集数据
PS screen printing brush 131, many illustrators have followed suit
Golang unit test, mock test and benchmark test
[RT thread] NXP rt10xx device driver framework -- RTC construction and use
Analyse ArrayList 3: suppression d'éléments
Redis: operation commands for list type data
毕业总结
大变局!全国房价,跌破万元大关
Luogu: p2685 [tjoi2012] Bridge
Solution to long waiting time of SSH connection to remote host
Loop through JSON object list
kubernetes资源对象介绍及常用命令(四)
[combinatorics] recursive equation (case where the non-homogeneous part is exponential | example where the non-homogeneous part is exponential)
WEB-UI自动化测试-最全元素定位方法