Web Performance in 2026: Core Web Vitals Optimization Guide
Google's Core Web Vitals directly impact search rankings. INP (Interaction to Next Paint) replaced FID in 2024, and it is a much harder metric to optimize. Here is the complete playbook.
LCP: Largest Contentful Paint (< 2.5s)
–
Preload the hero image: <link rel="preload" as="image" href="hero.webp">
–
Use responsive images with srcset and sizes attributes
–
Serve WebP/AVIF with a CDN that handles format negotiation
–
Inline critical CSS, defer everything else
INP: Interaction to Next Paint (< 200ms)
INP measures the worst interaction latency during the page lifecycle. Heavy JavaScript is the enemy:
–
Break long tasks with scheduler.yield()
–
Use CSS transitions instead of JavaScript animations
–
Virtualize long lists with react-window or TanStack Virtual
–
Move heavy computation to Web Workers
CLS: Cumulative Layout Shift (< 0.1)
Set explicit dimensions on images and embeds. Use font-display: optional to prevent FOUT layout shifts. Reserve space for dynamic content with CSS aspect-ratio or min-height.