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

largest-contentful-paint

它能做什么

这个技能检查页面中最大的可见元素出现的速度。它面向希望页面更快呈现可用状态的开发者。

适用场景

  • ✓你的首图或标题出现得很慢的时候。
  • ✓你的页面在 Largest Contentful Paint 指标上得分较低的时候。
  • ✓你的服务器发送首个页面响应很慢的时候。

技能链接

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

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“为什么我页面上的主图出现得这么慢?”

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

工作原理

智能体会测量最大元素出现的时间,并找出造成延迟的原因,例如图片加载慢或服务器响应慢。它会建议预加载关键资源、优化图片并使用 CDN。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Optimize largest contentful paint

LCP is the most important Core Web Vital for perceived load speed—it measures when the main content becomes visible, directly impacting user perception and SEO rankings.

Quick Reference

  • LCP measures when the largest element renders—target under 2.5s
  • Use preload for hero images and critical resources
  • Optimize image formats and use responsive sizes
  • Reduce server response time (TTFB)

Check

Measure LCP using Lighthouse or PageSpeed Insights. Verify the largest visible element renders within 2.5 seconds.

Fix

Optimize LCP by preloading critical resources, optimizing images, using CDN, and reducing server response time.

Explain

Explain how LCP measures perceived load speed by tracking when the largest visible content element becomes visible.

Code Review

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

常见问题

这个技能建议的目标是什么?

它建议主要内容在约 2.5 秒内出现。

什么是 TTFB?

它是服务器发送页面第一个字节所需的时间,这个技能建议减少它。

如何测量?

这个技能建议使用 Lighthouse 或 PageSpeed Insights。

详情

作者的原始描述

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

repo: thedaviddias/Front-End-Checklist

热度

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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能