Website Speed Optimization: A Core Web Vitals Guide
What are Core Web Vitals, how to measure them, common problems and fixes. LCP, INP, CLS explained with Next.js optimization techniques.
Google uses Core Web Vitals as a ranking signal. If your site is slow, you lose search rankings and visitors. This guide explains what each metric means, how to measure them, and how to fix the most common problems.
LCP (Largest Contentful Paint) measures how long it takes for the biggest visible element to load. Target: under 2.5 seconds. The usual culprits: unoptimized images, render-blocking JavaScript, slow server response times. Fix: use next/image for automatic WebP conversion and lazy loading, move critical CSS inline, use SSR or SSG instead of client-side rendering for above-the-fold content.
INP (Interaction to Next Paint) replaced FID in 2024. It measures how fast your site responds to user interactions (clicks, taps, key presses). Target: under 200ms. Common problems: heavy JavaScript execution blocking the main thread, third-party scripts (analytics, chat widgets), complex state updates. Fix: break up long tasks with dynamic imports, defer non-critical scripts, use React.memo and useMemo for expensive computations.
CLS (Cumulative Layout Shift) measures visual stability. Those annoying jumps when images load or ads insert themselves into the page. Target: under 0.1. Common causes: images without width/height, dynamically injected content, web fonts causing FOUT (Flash of Unstyled Text). Fix: always set dimensions on images (next/image does this automatically), use next/font for font loading, reserve space for dynamic content with CSS min-height.
How to measure: Google PageSpeed Insights (pagespeed.web.dev) gives you both lab and field data. Chrome DevTools Performance tab shows detailed waterfall charts. Lighthouse in Chrome gives you an overall score with specific recommendations. For real user data, use Google Search Console's Core Web Vitals report or Vercel Speed Insights.
Next.js specific optimizations: The Image component handles 80% of LCP issues automatically. Font optimization via next/font eliminates CLS from font loading. Dynamic imports with next/dynamic split code at the component level, reducing INP. The App Router's server components reduce client-side JavaScript by default. Streaming SSR with Suspense boundaries shows content progressively instead of waiting for everything to load.
Our target for every project: LCP under 2.5 seconds, INP under 200ms, CLS under 0.1, Lighthouse Performance above 90, Lighthouse SEO above 95. We measure these before launch and monitor continuously with Vercel Speed Insights.
Want a free performance analysis of your website? Send us your URL and we'll run a comprehensive audit with specific recommendations.
Let's discuss your project
15 minutes, no commitment.