Chrome's new version added support for <link rel="preload">
. They have posted a lot of info with references to the original documentation. Can someone provide simple explanation on how it works and what is the difference compared to the case without rel="preload"
.
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
- Adding a timeout to a render function in ReactJS
Google Developers suggest
rel="preload"
to be used to request fonts earlier to have them available when the CSSOM is ready.Use as:
Also, note:
In it's most basic form it sets the
link
that hasrel="preload"
to a high priority, Unlike prefetching, which the browser can decide whether it's a good idea or not, preload will force the browser to do so.===A more in-depth look:===
Here's a snippet from W3c
Here's a really in-depth look on W3c: https://w3c.github.io/preload/
But if you plan on using it, pay attention that browser support is not that great. Global browser support is at 82%.
Here's the full list: http://caniuse.com/#search=preload