当前位置:网站首页>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 .
边栏推荐
- Free data | new library online | cnopendata complete data of China's insurance intermediary outlets
- Kotlin learning quick start (7) -- wonderful use of expansion
- Graduation summary
- Tensorboard quick start (pytoch uses tensorboard)
- The largest matrix (H) in a brush 143 monotone stack 84 histogram
- Luogu: p2685 [tjoi2012] Bridge
- Electronic Science and technology 20th autumn "Microcomputer Principle and application" online assignment 2 [standard answer]
- Dagong 21 autumn "power plant electrical part" online operation 1 [standard answer] power plant electrical part
- [combinatorics] recursive equation (general solution structure of recursive equation with multiple roots | linear independent solution | general solution with multiple roots | solution example of recu
- 【RT-Thread】nxp rt10xx 设备驱动框架之--Audio搭建和使用
猜你喜欢

Wechat applet for the first time

Cross border e-commerce: advantages of foreign trade enterprises in overseas social media marketing

POM in idea XML graying solution

1164 Good in C

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

One brush 149 force deduction hot question-10 regular expression matching (H)

大变局!全国房价,跌破万元大关

Collection of the most beautiful graduation photos in the graduation season, collection of excellent graduation photos

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

UE4 official charging resources, with a total price of several thousand
随机推荐
Simple use of unity pen XR grab
How to enforce parameters in PowerShell- How do I make parameters mandatory in PowerShell?
数仓任务里面 跑SQL任务的时候用的数据库账号是在哪里配置的
绝对定位时元素水平垂直居中
How do large consumer enterprises make digital transformation?
AcWing 4489. 最长子序列
Cross border e-commerce: advantages of foreign trade enterprises in overseas social media marketing
One brush 145 force deduction hot question-2 sum of two numbers (m)
Internet hospital his management platform source code, online consultation, appointment registration smart hospital applet source code
[combinatorics] recursive equation (the problem of solving recursive equation with multiple roots | the problem is raised)
Dagong 21 autumn "power plant electrical part" online operation 1 [standard answer] power plant electrical part
AcWing 3438. Number system conversion
网络硬盘NFS的安装与配置
互聯網醫院HIS管理平臺源碼,在線問診,預約掛號 智慧醫院小程序源碼
Simple configuration of postfix server
Vs2013 has blocked the installer, and ie10 needs to be installed
大变局!全国房价,跌破万元大关
[mathematical logic] equivalent calculus and reasoning calculus of predicate logic (individual word | predicate | quantifier | predicate logic formula | two basic formulas | proposition symbolization
An example of HP array card troubleshooting
Life is still confused? Maybe these subscription numbers have the answers you need!