You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: skills/debug-optimize-lcp/SKILL.md
+15-6Lines changed: 15 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,12 +17,12 @@ LCP is a Core Web Vital that directly affects user experience and search ranking
17
17
18
18
Every page's LCP breaks down into four sequential subparts with no gaps or overlaps. Understanding which subpart is the bottleneck is the key to effective optimization.
19
19
20
-
| Subpart | Ideal % of LCP | What it measures |
21
-
|---------|---------------|------------------|
22
-
|**Time to First Byte (TTFB)**|~40% | Navigation start → first byte of HTML received |
The "delay" subparts should be as close to zero as possible. If either delay subpart is large relative to the total LCP, that's the first place to optimize.
28
28
@@ -66,6 +66,7 @@ Use `list_network_requests` to see when the LCP resource loaded relative to othe
66
66
- Then use `get_network_request` with the LCP resource's request ID for full details.
67
67
68
68
**Key Checks:**
69
+
69
70
-**Start Time**: Compare against the HTML document and the first resource. If the LCP resource starts much later than the first resource, there's resource load delay to eliminate.
70
71
-**Duration**: A large resource load duration suggests the file is too big or the server is slow.
71
72
@@ -78,28 +79,36 @@ Use `evaluate_script` with the **"Audit Common Issues" snippet** found in [refer
78
79
After identifying the bottleneck subpart, apply these prioritized fixes.
|**Time to First Byte (TTFB)**|~40% | The time from when the user initiates loading the page until the browser receives the first byte of the HTML document response. |
12
-
|**Resource load delay**| <10% | The time between TTFB and when the browser starts loading the LCP resource. If the LCP element doesn't require a resource load (e.g., system font text), this time is 0. |
13
-
|**Resource load duration**|~40% | The duration of time it takes to load the LCP resource itself. If the LCP element doesn't require a resource load, this time is 0. |
14
-
|**Element render delay**| <10% | The time between when the LCP resource finishes loading and the LCP element rendering fully. |
|**Time to First Byte (TTFB)**|~40% | The time from when the user initiates loading the page until the browser receives the first byte of the HTML document response.|
12
+
|**Resource load delay**| <10%| The time between TTFB and when the browser starts loading the LCP resource. If the LCP element doesn't require a resource load (e.g., system font text), this time is 0. |
13
+
|**Resource load duration**|~40% | The duration of time it takes to load the LCP resource itself. If the LCP element doesn't require a resource load, this time is 0.|
14
+
|**Element render delay**| <10% | The time between when the LCP resource finishes loading and the LCP element rendering fully.|
Copy file name to clipboardExpand all lines: skills/debug-optimize-lcp/references/optimization-strategies.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
# LCP Optimization Strategies
2
2
3
3
## 1. Eliminate Resource Load Delay
4
+
4
5
**Goal**: Ensure the LCP resource starts loading as early as possible.
5
6
6
7
-**Early Discovery**: Ensure the LCP resource is discoverable in the initial HTML document response (not dynamically added by JS or hidden in `data-src`).
@@ -10,6 +11,7 @@
10
11
-**Same Origin**: Host critical resources on the same origin or use `<link rel="preconnect">`.
11
12
12
13
## 2. Eliminate Element Render Delay
14
+
13
15
**Goal**: Ensure the LCP element can render immediately after its resource has finished loading.
14
16
15
17
-**Minimize Render-Blocking CSS**: Inline critical CSS and defer non-critical CSS. Ensure the stylesheet is smaller than the LCP resource.
@@ -18,6 +20,7 @@
18
20
-**Break Up Long Tasks**: Prevent large JavaScript tasks from blocking the main thread during rendering.
19
21
20
22
## 3. Reduce Resource Load Duration
23
+
21
24
**Goal**: Reduce the time spent transferring the bytes of the resource.
22
25
23
26
-**Optimize Resource Size**: Serve optimal image sizes, use modern formats (AVIF, WebP), and compress images/fonts.
@@ -26,6 +29,7 @@
26
29
-**Caching**: Use efficient `Cache-Control` policies.
27
30
28
31
## 4. Reduce Time to First Byte (TTFB)
32
+
29
33
**Goal**: Deliver the initial HTML as quickly as possible.
30
34
31
35
-**Minimize Redirects**: Avoid multiple redirects from advertisements or shortened links.
0 commit comments