html - 如何根据浏览器仅预加载所需的类型(woff vs woff2)?
问题描述
我正在使用以下react-helmetwoff
代码,我看到这两个woff2
文件都是由 Firefox 预加载的(仅需要它是低效woff2
的)。
正常的Firefox会同时加载吗?如何告诉浏览器只预加载所需的文件?
<Helmet
link={[
{
rel: "preload",
href: "/static/media/open-sans-latin-400.347639ec.woff",
as: "font",
type: "font/woff",
crossOrigin: "anonymous",
},
{
rel: "preload",
href: "/static/media/open-sans-latin-400.f57a62e9.woff2",
as: "font",
type: "font/woff2",
crossOrigin: "anonymous",
},
]}
/>
解决方案
推荐阅读
- azure - 运行容器化应用程序时的身份?
- magento2 - 未捕获的错误:找不到类“GuzzleHttp\Client”
- c# - C#如何访问NCrontab的非公共成员?
- python - 如何在 Pipfile 中指定特定于操作系统的轮文件
- python - Dynamo - 仅当其值相同或记录不存在时才添加项目
- angular - 为什么 observable.subscribe 仅适用于构造函数
- amp-html - 将预订广告翻译到 AMP 页面
- grafana - Grafana+InfluxDB:根据自定义变量的值显示系列
- string - 如何保存渲染的模板而不是打印到 os.Stdout?
- c# - Outlook 自动完成列表从 .dat 文件中读取