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
原文在 Web Performance Made Easy: Google I/O 2018 edition,作者基于 lighthouse extension 提出了很多前端优化的建议。
The text was updated successfully, but these errors were encountered:
原文大纲如下:
Sorry, something went wrong.
优化首屏还有个骨架屏方案,貌似文中没有提到,关键字 Skeleton Screen 可以研究一下。 然后 font-display: swap 如果兼容有问题的话,可以用 Web Font Loader。
webpack 4.6.0 开始已经支持生成 rel=preload/preconnect 的 link 了,vue-cli3 也默认打开了这个功能。
通过 @font-face 嵌入的字体一般会在使用时开始加载(相关讨论),js 一般放在 </body> 之前加载执行,后面才轮到 FontFace 加载。
@font-face
</body>
FontFace
而 rel=preload/preconnect 的 font 和 script 可以提前到解析 head 时开始加载,不会阻塞 html 加载,也不会影响 js 执行时间。
rel=preload/preconnect
相关阅读: Getting started with CSS Font Loading Implementing @font-face
No branches or pull requests
原文在 Web Performance Made Easy: Google I/O 2018 edition,作者基于 lighthouse extension 提出了很多前端优化的建议。
The text was updated successfully, but these errors were encountered: