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

first-contentful-paint

它能做什么

这项技能检查页面向访客首次显示内容的速度。适用于希望页面在首次加载时就显得很快的开发者。

适用场景

  • ✓当访客在任何内容出现前长时间看到空白页面的时候。
  • ✓当你的页面在 First Contentful Paint 上得分较低的时候。
  • ✓当脚本或样式阻碍了网站首屏显示的时候。

技能链接

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/first-contentful-paint/SKILL.md

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“为什么我的页面要等很久才显示出任何内容?”

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

工作原理

智能体会检查阻塞渲染的样式和脚本、缓慢的服务器响应以及第三方连接。它会建议移除阻碍因素、内联关键 CSS,并对外部网站使用 preconnect。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Optimize first contentful paint

FCP is the first visual signal that a page is loading—fast FCP reassures users that the site is responding, reducing perceived wait time and bounce rates.

Quick Reference

  • FCP measures time until first text/image appears—target under 1.8s
  • Eliminate render-blocking CSS and JavaScript
  • Inline critical CSS for above-fold content
  • Use preconnect for third-party origins

Check

Measure FCP using Lighthouse or PageSpeed Insights. Verify first content appears within 1.8 seconds.

Fix

Optimize FCP by eliminating render-blocking resources, inlining critical CSS, and reducing server response time.

Explain

Explain how FCP measures the time until the first text or image is painted, indicating page load has begun.

Code Review

Review the routes, assets, and loading behavior that affect Optimize first contentful paint. 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/first-contentful-paint

常见问题

什么是 First Contentful Paint?

它是页面上首次出现文字或图片所需的时间。

这项技能提到的目标是什么?

它提到的目标是低于 1.8 秒。

什么是 preconnect?

它是一个 HTML 提示,可以提前与外部网站建立连接,使其文件更快加载。

详情

作者的原始描述

Use when auditing slow page loads, heavy assets, or rendering delays related to Optimize first contentful paint. Verify the actual bottleneck in DevTools, Lighthouse, or field data before recommending changes.

repo: thedaviddias/Front-End-Checklist

热度

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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能