跳到正文
Skillpedia
网站与界面(前端)75k · #2790

critical-request-chains

它能做什么

这项技能检查是否存在一长串文件,每个文件都必须等待另一个文件加载后才能加载。适合希望页面更快呈现的开发者。

适用场景

  • ✓当 Lighthouse 或 WebPageTest 显示页面加载时存在较长的请求链时。
  • ✓当一个样式表加载了另一个文件,从而延迟首次绘制时。
  • ✓当一个重要资源只隐藏在其他文件的深处时。

技能链接

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/critical-request-chains/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/critical-request-chains/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我的首页在显示任何内容之前,要依次等待好几个文件。请找出这条链并将其缩短。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会梳理依赖链,在有帮助的地方内联关键资源,并为位于链条深处的关键资源添加预加载提示。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Minimize critical request chains

Long chains of dependent requests delay the initial rendering of the page, as each resource must wait for its parent to be fetched and processed.

Quick Reference

  • Reduce the depth of dependent resource requests
  • Inline critical CSS to avoid extra network roundtrips
  • Use preload hints for essential assets found deep in the chain

Check

Identify long chains of dependent requests that block the critical rendering path using Lighthouse or WebPageTest.

Fix

Flatten the request chain by inlining critical resources or using preload hints for essential assets.

Explain

Explain how critical request chains impact the Time to First Paint and how to optimize the rendering path.

Code Review

Review the routes, assets, and loading behavior that affect Minimize critical request chains. Flag exact files, requests, or rendering steps that add unnecessary network, CPU, or layout cost, and describe the measurement method used to confirm the issue.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/performance/critical-request-chains

常见问题

请求链如何拖慢页面?

这项技能说明,每个资源都必须等待其父资源被获取并处理之后,下一个才会开始。

preload 有什么用?

它告诉浏览器提前获取某个关键文件。

如何找到这条链?

这项技能建议使用 Lighthouse 或 WebPageTest。

详情

作者的原始描述

Use when auditing slow page loads, heavy assets, or rendering delays related to Minimize critical request chains. Verify the actual bottleneck in DevTools, Lighthouse, or field data before recommending changes.

repo: thedaviddias/Front-End-Checklist

热度

GitHub 星标
75k
排名
#2790
许可证
MIT
更新时间
2026/10/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能