Google's Web Vitals initiative provides a standardized framework for measuring user experience through key performance signals. Web Vitals turns real user metrics into clear, measurable metrics.
This standardization enables site owners to consistently track their performance and understand how users experience their pages. Rather than introducing new optimization techniques, Web Vitals creates a common language and measurement system for evaluating web performance across different sites and contexts.
Core Web Vitals are a subset of Web Vitals, representing the metrics considered most important for user experience. They are part of Google's "Page Experience" signals, which affect a website's search ranking.
The three main metrics of Core Web Vitals are:
LCP (Largest Contentful Paint) measures the time it takes for the largest content element visible in the viewport to become fully loaded and visible to the user. This element could be an image, video, or a sizeable block-level text.
LCP is a key metric for understanding how quickly a page's main content loads, which is a crucial part of the overall user experience. Pages that load faster engage users better and reduce bounce rates, positively influencing SEO rankings.
Here are some common strategies to optimize Largest Contentful Paint (LCP) in Next.js apps:
Use WebP/AVIF format.
Use next/image priority prop for above-the-fold images.
Lazy load non-critical images (done automatically by next/image)
Use srcset attribute to size the image appropriately (done automatically by next/image)
Use <link rel="preload"> for early fetching essential resources. Evaluate which resources are critical for the first render and preload only those.
Enable server-side rendering to quicken initial content visibility.
Inline necessary above-the-fold CSS.
Establish early connections to crucial third-party domains.
Interaction To Next Paint (INP) is a critical user-centric performance metric used to track a web page's responsiveness. It measures the delay between a user's interaction with a page, such as clicking a link or tapping a button, and the time the browser can begin processing event handlers in response.
A lower INP score means a more responsive site, which matters because responsiveness directly impacts user satisfaction. A webpage that reacts swiftly to user inputs feels more fluid and natural, improving the overall user experience.
CLS (Cumulative Layout Shift) measures a website's visual stability by tracking unexpected content shifts during loading. A high CLS score can frustrate users, as shifting elements may cause accidental clicks.
FCP measures how quickly a page displays the first piece of content to users. Ideally, sites should achieve an FCP of 1.8 seconds or less.
How to optimize FCP:
TBT measures how long the main thread is blocked by long tasks, preventing the page from responding to user interactions. It is measured between FCP and Time to Interactive (TTI).
TTFB measures the duration from when a resource request is made until the first byte of the response is received.
Time To Interactive (TTI) — removed from Lighthouse 10, replaced by LCP, TBT, and INP.
First Input Delay (FID) — replaced by INP because INP captures the latency of all interactions within a session, not just the first one.
Metric | Abbreviation | Weighting
First Contentful Paint | FCP | 10%
Speed Index (SI) | SI | 10%
Largest Contentful Paint (LCP) | LCP | 25%
Total Blocking Time (TBT) | TBT | 30%
Cumulative Layout Shift (CLS) | CLS | 25%
Strategic Focus for Optimization: