当前位置:网站首页>link preload prefetch
link preload prefetch
2022-07-03 17:30:00 【Flying bear blablabla】
link rel
attribute preload
prefetch
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 .
边栏推荐
- Apache服务挂起Asynchronous AcceptEx failed.
- How to purchase Google colab members in China
- A day's work list of an ordinary programmer
- RedHat 6.2 配置 Zabbix
- Squid 服务启动脚本
- Answer to the homework assessment of advanced English reading (II) of the course examination of Fuzhou Normal University in February 2022
- [combinatorics] recursive equation (the non-homogeneous part is an exponential function and the bottom is the characteristic root | example of finding a special solution)
- Leetcode 669 pruning binary search tree -- recursive method and iterative method
- 1164 Good in C
- Type conversion, variable
猜你喜欢
Collection of the most beautiful graduation photos in the graduation season, collection of excellent graduation photos
[error reporting] omp: error 15: initializing libiomp5md dll, but found libiomp5md. dll already initialized.
Hongmeng third training
Kubernetes resource object introduction and common commands (III)
Introduction to SolidWorks gear design software tool geartrax
kubernetes资源对象介绍及常用命令(三)
2021 ICPC regional competition (Shanghai) g.edge groups (tree DP)
Test your trained model
How to train mask r-cnn model with your own data
Unity notes unityxr simple to use
随机推荐
基于主机的入侵系统IDS
Examination questions for the assignment of selected readings of British and American Literature in the course examination of Fujian Normal University in February 2022
UE4 official charging resources, with a total price of several thousand
One brush 146 force buckle hot question-3 longest substring without repeated characters (m)
Automata and automatic line of non-standard design
Host based intrusion system IDS
Loop through JSON object list
IntelliJ 2021.3 short command line when running applications
Kubernetes resource object introduction and common commands (III)
Applet setting multi account debugging
Electronic Science and technology 20th autumn "Microcomputer Principle and application" online assignment 2 [standard answer]
新库上线 | CnOpenData中国保险机构网点全集数据
PR second time
AcWing 4489. 最长子序列
数仓任务里面 跑SQL任务的时候用的数据库账号是在哪里配置的
Solution to long waiting time of SSH connection to remote host
[RT thread] NXP rt10xx device driver framework -- RTC construction and use
First day of rhcsa study
The difference between get and post
【RT-Thread】nxp rt10xx 设备驱动框架之--rtc搭建和使用