Core Web Vitals became Google ranking factors in 2021, but many sites still fail to meet even the "Needs Improvement" thresholds. Here's a comprehensive guide to diagnosing and fixing every metric.
Understanding the Three Core Metrics
Largest Contentful Paint (LCP): Measures loading performance. The LCP element is typically a hero image, video poster, or large text block. Good: under 2.5s. Poor: over 4s.
Interaction to Next Paint (INP): Replaced First Input Delay in 2024. Measures responsiveness to user interactions throughout the page lifecycle. Good: under 200ms. Poor: over 500ms.
Cumulative Layout Shift (CLS): Measures visual stability — how much content moves unexpectedly while loading. Good: under 0.1. Poor: over 0.25.
Diagnosing Your Current Performance
Start with field data, not lab data. CrUX (Chrome User Experience Report) data in Google Search Console shows real-user performance. PageSpeed Insights shows both. Lab tools like Lighthouse are useful for debugging but don't reflect your ranking signal.
Tools to use:
- Google Search Console → Core Web Vitals report: Shows pages with issues, segmented by mobile/desktop
- CrUX Dashboard: Historical trends
- PageSpeed Insights: Detailed recommendations per URL
- Web Vitals Chrome Extension: Real-time measurement while browsing
Fixing LCP
The biggest LCP wins, in order of impact:
Eliminate render-blocking resources: CSS and JavaScript in the delay the browser from rendering anything. Defer non-critical JS, inline critical CSS, or preload key resources.
Optimize your LCP image:
- Use
fetchpriority="high"on your LCP image - Never lazy-load the LCP element
- Serve images in WebP or AVIF format
- Size images appropriately (no 2MB hero images)
- Use a CDN with edge caching
Reduce server response time: TTFB directly affects LCP. Target under 800ms. Use edge caching for static content, optimize database queries, and consider Edge Runtime for Next.js.
Remove unused JavaScript: Every byte of JS that must be parsed delays LCP. Use bundle analysis tools (webpack-bundle-analyzer, Next.js Bundle Analyzer) to identify and eliminate unused code.
Fixing INP
INP is measured across all interactions, not just the first one. The fix is almost always JavaScript:
Break up long tasks: Any JavaScript task over 50ms can cause poor INP. Use scheduler.yield() or setTimeout to break long tasks into chunks that yield to the browser.
Reduce third-party script impact: Tag managers, analytics, chat widgets, and ad scripts are common INP killers. Audit every third-party script. Load them asynchronously and consider using the Partytown library to move them off the main thread.
Optimize event handlers: Expensive event handlers (click, input, keydown) directly cause INP issues. Profile your JavaScript in Chrome DevTools Performance panel to identify slow handlers.
Fixing CLS
CLS is the most misunderstood metric. The fixes are usually straightforward once you understand the cause:
Set explicit dimensions on images and videos: If the browser doesn't know the size of an image before it loads, it will shift content when the image appears. Always use width and height attributes, or use CSS aspect-ratio.
Avoid inserting content above existing content: Banners, cookie notices, and dynamically injected ads are major CLS offenders. Use reserved space or CSS animations that don't shift layout.
Use CSS transforms for animations: Animating top/left/width/height triggers layout recalculation. Use transform and opacity instead, which use the GPU compositor and don't cause layout shift.
Font loading: Custom fonts can cause FOIT (Flash of Invisible Text) or FOUT (Flash of Unstyled Text), contributing to CLS. Use font-display: optional or font-display: swap with appropriate fallback font metrics.
The Measurement and Monitoring Loop
Performance work is never done. Implement continuous monitoring:
- Set up CrUX API polling with alerts for regressions
- Add Lighthouse CI to your CI/CD pipeline with performance budgets
- Use Real User Monitoring (RUM) in production — the built-in web-vitals library is free
The sites that maintain good Core Web Vitals treat performance as an ongoing discipline, not a one-time project. Schedule a performance review every quarter and enforce performance budgets in CI to prevent regressions.
More Articles
Kubernetes Best Practices for Production in 2025
Discover the essential patterns and practices for running Kubernetes workloads reliably at scale in ...
10 Proven Strategies to Cut Your AWS Bill by 40%
Real-world FinOps strategies that our team has used to dramatically reduce cloud costs for clients w...