web-performance-optimization
/

Core Web Vitals

Last Sync: Today

On this page

11
0%
5 min read
Remaining
5 minleft

Click any section to jump — progress syncs automatically

web-performance-optimization

Core Web Vitals

What are Core Web Vitals?

Core Web Vitals are a set of performance metrics defined by Google to measure real-world user experience on a website. They focus on loading speed, interactivity, and visual stability.

Why Core Web Vitals Matter

Core Web Vitals directly impact SEO rankings and user experience. Websites with better scores load faster, respond quickly, and provide a stable layout.

Key Metrics

MetricFull FormPurpose
LCPLargest Contentful PaintMeasures loading speed
FIDFirst Input DelayMeasures interactivity
CLSCumulative Layout ShiftMeasures visual stability

Largest Contentful Paint (LCP)

LCP measures how long it takes for the largest visible element (like an image or heading) to load. A good LCP score is under 2.5 seconds.

HTMLRead-only
1
<!-- Optimize LCP -->
<img src="hero.webp" loading="eager" alt="Hero Image">

First Input Delay (FID)

FID measures the time between user interaction (like clicking a button) and the browser's response. A good FID score is less than 100 milliseconds.

JavaScriptRead-only
1
// Reduce FID by minimizing JS
button.addEventListener('click', () => {
  console.log('Clicked');
});

Cumulative Layout Shift (CLS)

CLS measures unexpected layout shifts during page load. A good CLS score is less than 0.1.

CSSRead-only
1
img {
  width: 100%;
  height: auto;
}

Ideal Values

MetricGoodNeeds ImprovementPoor
LCP< 2.5s2.5s - 4s> 4s
FID< 100ms100ms - 300ms> 300ms
CLS< 0.10.1 - 0.25> 0.25

How to Improve Core Web Vitals

  • Optimize images and use modern formats (WebP)
  • Minimize JavaScript execution time
  • Use lazy loading for non-critical resources
  • Set width and height for images to prevent layout shifts
  • Use CDN to improve loading speed

Tools to Measure Core Web Vitals

ToolPurpose
PageSpeed InsightsAnalyze real user data
LighthouseAudit performance
Chrome DevToolsDebug performance
Search ConsoleTrack site-wide vitals

Common Mistakes

  • Not optimizing images
  • Loading heavy JavaScript files early
  • Not reserving space for images
  • Ignoring performance testing tools

Conclusion

Core Web Vitals are essential metrics for modern web development. Improving them leads to faster websites, better user experience, and higher SEO rankings.

Try it yourself

<img src="image.webp" loading="lazy" width="300" height="200" alt="Example">

Test Your Knowledge

Q1
of 3

Which metric measures loading speed?

A
FID
B
CLS
C
LCP
D
TTI
Q2
of 3

What is ideal CLS?

A
< 0.1
B
< 1
C
< 5
D
< 10
Q3
of 3

Which tool measures Core Web Vitals?

A
VS Code
B
PageSpeed Insights
C
Photoshop
D
Figma

Frequently Asked Questions

What are Core Web Vitals?

They are metrics used by Google to measure user experience on a website.

What is a good LCP score?

Less than 2.5 seconds.

How to reduce CLS?

Set fixed dimensions for images and avoid layout shifts.

Previous

web performance introduction

Next

web performance metrics

Related Content

Need help?

Explore our comprehensive docs or start a chat with our tech experts.