消除放大器页面上的渲染资源字体
我尝试了多种解决方案,但不起作用
<link rel="preload" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,600,700,900&display=swap" as="font" crossorigin>
<link rel="preload" href="https://fonts.googleapis.com/css?family=Cairo:300,400,600,700&subset=arabic,latin-ext&display=swap" as="font" crossorigin>
Google Lighthouse raising issues of AMP Pages
I tried multiple solutions but not working
<link rel="preload" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,600,700,900&display=swap" as="font" crossorigin>
<link rel="preload" href="https://fonts.googleapis.com/css?family=Cairo:300,400,600,700&subset=arabic,latin-ext&display=swap" as="font" crossorigin>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这对我有帮助(提出HTML索引):
This helped me (put in HTML index):
您可以添加一个Onload侦听器以将
rel
属性从PRELOAD
更改为stylesheet
这看起来很像:
您可以在 web.dev
You can add a onload listener to change the
rel
attribute frompreload
tostylesheet
this will look something like:
You can read more about this topic at web.dev
web.dev 表示您应该以这种方式预订:
但是请使用另一种字体,但是要使用另一种字体直至字体已加载:
web.dev says that you should preload in this way:
But use another font till fonts are loaded: