We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
原计划将页面依赖的 JS 资源,通过 preload 的方式进行预加载
ice-lab/ice-next#229
但实时上,浏览器在下载完 HTML 后,HTML 中声明的 link 和 script 资源会被立即发起请求,且是并行的,而非按顺序边解析,边加载。
所以将 body 中的 script 内容前置到 head 中,使用 preload,并不会提前资源的加载时机。
通过 preload 可能带来较大收益的场景是:
更多讨论见 ice-lab/ice-next#230
The text was updated successfully, but these errors were encountered:
按 Chrome 对的说法,Preload 适用于配置一些不容易被识别的关键资源,例如:样式中的字体文件、背景图、异步加载的脚本
https://web.dev/fetch-priority/
Sorry, something went wrong.
chenjun1011
answershuto
No branches or pull requests
原计划将页面依赖的 JS 资源,通过 preload 的方式进行预加载
ice-lab/ice-next#229
但实时上,浏览器在下载完 HTML 后,HTML 中声明的 link 和 script 资源会被立即发起请求,且是并行的,而非按顺序边解析,边加载。
所以将 body 中的 script 内容前置到 head 中,使用 preload,并不会提前资源的加载时机。
通过 preload 可能带来较大收益的场景是:
更多讨论见 ice-lab/ice-next#230
The text was updated successfully, but these errors were encountered: