Skip to content
学习 衡量 博客 Case studies 关于
本页内容
  • Lighthouse 如何识别关键请求链
  • 特定于堆栈的指南
    • Magento
  • 资源

避免链接关键请求

May 2, 2019 — 更新日期 Apr 29, 2020
Available in: Español, 日本語, 한국어, Português, Русский, English
Appears in: 性能审核
本页内容
  • Lighthouse 如何识别关键请求链
  • 特定于堆栈的指南
    • Magento
  • 资源

关键请求链是一系列对页面呈现很重要的依赖网络请求。链的长度越长,下载量越大,对页面加载性能的影响就越大。

Lighthouse 报告通过高优先级加载的关键请求:

Lighthouse 最小化关键请求深度审计的截图
See the Lighthouse performance scoring post to learn how your page's overall performance score is calculated.

Lighthouse 如何识别关键请求链 #

Lighthouse 使用网络优先级作为识别阻塞呈现的关键资源的代理。有关 Chrome 如何定义这些优先级的更多信息,请参阅 Google 的 Chrome 资源优先级和调度。

有关关键请求链、资源大小和下载资源所用时间的数据是从 Chrome 远程调试协议中提取的。

如何减少关键请求链对性能的影响 #

使用关键请求链审计结果首先定位对页面加载影响最大的资源:

  • 最小化关键资源的数量:消除它们,推迟下载,将它们标记为 async 等等。
  • 优化关键字节数以减少下载时间(往返次数)。
  • 优化剩余关键资源的加载顺序:尽早下载所有关键资产,缩短关键路径长度。

了解有关优化图像、JavaScript、CSS 和 Web 字体的更多信息。

特定于堆栈的指南 #

Magento #

如果您不捆绑您的 JavaScript 资产,请考虑使用 baler。

资源 #

最小化关键请求深度审计的源代码

Last updated: Apr 29, 2020 — Improve article
Return to all articles
分享
订阅

Contribute

  • 提交错误
  • 查看源代码

相关内容

  • developer.chrome.com
  • Chrome 动态
  • 网站开发基础
  • 案例研究
  • 播客
  • 节目

连接

  • Twitter
  • YouTube
  • Google Developers
  • Chrome
  • Firebase
  • Google Cloud Platform
  • 所有产品
  • 条款和隐私权
  • 社区准则

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies.