html - 最小化谷歌字体请求

标签 html css performance optimization

我的主页有以下链接,我需要为此提出一个关于性能问题的共同请求。

<link href='https://fonts.googleapis.com/css?family=Arvo:400,700' rel='stylesheet' type='text/css' />
    <link href='http://fonts.googleapis.com/css?family=Roboto:400,300italic,400italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'/>
    <link href='http://fonts.googleapis.com/css?family=Lato:300,400,700,900,700italic' rel='stylesheet' type='text/css'/>

最佳答案

https://fonts.google.com/

再次在 google fonts 上重新选择您需要的所有字体。更新后的 API 将为所有组合的字体创建一个 URL,如下所示:

<link href="https://fonts.googleapis.com/css?family=Arvo:400,400i,700,700i|Lato:100,100i,300,300i,400|Roboto:400,500i,700,700i,900" rel="stylesheet">

您可能会考虑减少所需的字体粗细数量,因为如果您不使用它们,它们会增加不必要的负载。

关于html - 最小化谷歌字体请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40992357/

相关文章:

java - 当 MethodHandle 更快时,为什么要使用反射来访问类成员?

android - Libgdx - 渲染许多小 Sprite VS 一些大 Sprite

html - 内联div不显示

html - 样式化文本输入插入符

html - 在包装下一个元素之前应用溢出隐藏

jquery - 单击第二个时如何设置第一个切换始终打开然后关闭

html - 应用于全尺寸页面的 css 媒体查询

html - 图标的 CSS 位置

java - 在旧的谷歌浏览器 gwt 表单设计中正确显示。但不支持 chrome 新版本 65.0.3325.162

r - 使用R中的igraph计算开放三角形顶点中节点的出现次数