← Back to Blogs

Website Performance — Core Web Vitals Explained

November 10, 2025 · 10 min read

Performance SEO Lighthouse Web Vitals PHP

Introduction

Since 2021, Google's Core Web Vitals have been a direct ranking signal. Three metrics — Largest Contentful Paint (LCP), Interaction to Next Paint (INP, replacing FID in 2024), and Cumulative Layout Shift (CLS) — quantify the real-world user experience of your site. Poor scores not only hurt SEO but directly correlate with lower conversion rates, higher bounce rates, and reduced user satisfaction. This guide explains each metric and provides actionable optimization strategies.

What Are Core Web Vitals?

LCP measures perceived load speed — the time it takes for the largest visible element (hero image, heading block) to render. INP measures interactivity — the time from a user interaction (click, tap) to the next paint. CLS measures visual stability — unexpected layout shifts during load. Good thresholds are LCP ≤ 2.5 seconds, INP ≤ 200 milliseconds, and CLS ≤ 0.1. Google uses field data from Chrome User Experience Report (CrUX) to evaluate these metrics across real user visits.

Optimizing Largest Contentful Paint

LCP is the most impactful metric because it directly reflects how fast a user sees meaningful content. Start by reducing server response time (TTFB). Use a CDN for static assets, preload critical resources with <link rel="preload">, and optimize images with WebP or AVIF formats. For PHP applications, enabling OPcache, using Nginx FastCGI cache, and implementing a Redis-based page cache can dramatically reduce LCP.

<!-- Preloading hero image for LCP -->
<link rel="preload" as="image"
      href="/images/hero.webp"
      type="image/webp"
      fetchpriority="high" />

Optimizing Interaction to Next Paint

INP (previously FID) measures responsiveness to user input. The primary culprit is heavy JavaScript that blocks the main thread. Split your JavaScript bundles with dynamic imports, use code splitting, defer non-critical scripts with async or defer, and consider using Web Workers for CPU-intensive tasks. In Laravel, defer Livewire component hydration where possible and avoid loading large JavaScript libraries on every page.

// Dynamic import for non-critical components
import('/components/HeavyChart.js').then(mod => {
  mod.renderChart()
})

Optimizing Cumulative Layout Shift

CLS occurs when elements shift after the user has already started viewing. Always specify explicit width and height attributes on images and video embeds. Use font-display: swap in your @font-face declarations to prevent invisible text causing layout shifts when web fonts load. Avoid injecting content above existing content — this includes ads, banners, and cookie consent dialogs without reserved space.

@font-face {
  font-family: 'Ranade';
  src: url('/fonts/ranade.woff2') format('woff2');
  font-display: swap; /* prevents invisible text layout shift */
}

/* Always set image dimensions */
img { width: auto; height: auto; aspect-ratio: 16 / 9; }

Server-Side Optimization for PHP

Backend performance is the foundation of good Core Web Vitals. Enable PHP OPcache to cache compiled scripts in memory. Configure Nginx FastCGI cache to serve cached pages without hitting PHP at all for anonymous traffic. Use Redis for session storage, application cache, and full-page caching with Laravel's built-in cache system. Optimize database queries — use indexes, eager load relationships, and avoid N+1 queries. A single slow query can add 500+ ms to TTFB, directly inflating LCP.

Monitoring and Tools

Google Lighthouse (in Chrome DevTools) provides a lab-based score with detailed recommendations. PageSpeed Insights combines lab data with real-world CrUX field data. For continuous monitoring, use tools like WebPageTest, Calibre, or SpeedCurve that track Core Web Vitals over time. Set up performance budgets in your CI pipeline to prevent regressions. The Chrome User Experience Report API can be queried to check your site's field data programmatically.

Conclusion

Core Web Vitals are not just a ranking factor — they are a reflection of your users' experience. Start by measuring your current scores with Lighthouse and PageSpeed Insights, then address LCP first (it has the highest impact on perception), followed by INP (interactivity), and finally CLS (layout stability). Performance optimization is an ongoing process, not a one-time project. Make it part of your development workflow from the start.

Need help improving your Core Web Vitals? Our team specializes in performance audits and optimization for PHP and Laravel applications. We can help you achieve green scores across all metrics.

Get in Touch