What do LCP, INP and CLS measure?
- LCP: 2.5 seconds or less
- INP: 200 milliseconds or less
- CLS: 0.1 or less
What is the difference between field data and lab data?
- PageSpeed Insights shows field data at the top (when your URL has enough traffic) and a Lighthouse lab run below it.
- The Core Web Vitals report in Search Console groups your URLs by field status, so you can see which templates fail.
- In its default page-load run, Lighthouse reports LCP and CLS but not INP, because nothing interacts with the page. Total Blocking Time is the lab proxy that web.dev suggests for catching interactivity problems.
How do I improve LCP in a Next.js site?
Tsx
How do I stop layout shifts?
- Give every image a width and height, or import it statically so Next.js does it for you. With fill, put the image inside a parent that has a fixed size or aspect ratio.
- Reserve room for embeds, ads and cookie banners. If a banner pushes the page down after load, make it overlay the page or give it a fixed slot.
- Make loading skeletons the same height as the content that replaces them.
- Animate with transform and opacity rather than properties such as height or top, which move other elements.
How do I improve INP in React?
Tsx
Tsx
How do I measure Core Web Vitals with the web-vitals package?
Tsx