β 1. First Contentful Paint (FCP)
Target: < 1.8s
π First visual feedback to the user
β Best Practices:
- β© Use CDN for static assets
- π― Inline critical CSS
- π§Ό Minify & defer non-critical CSS/JS
- πΌοΈ Optimize above-the-fold images
- π Preload key resources (
<link rel="preload">) - π Reduce server response time (use cache, edge computing)
β 2. Largest Contentful Paint (LCP)
Target: < 2.5s
π Render the largest visible content quickly
β Best Practices:
- πΌοΈ Use next-gen image formats: WebP, AVIF
- π§ Compress & resize hero images
- π₯ Preload the LCP image/font/asset
- π« Avoid lazy-loading above-the-fold content
- π‘ Serve HTML quickly (SSR or static HTML for first load)
β 3. Total Blocking Time (TBT)
Target: < 200ms
π Main thread responsiveness during load
β Best Practices:
- π§ Break large JavaScript tasks into chunks
- π§΅ Offload heavy computation to Web Workers
- βοΈ Reduce third-party scripts and tracking pixels
- π¦ Use code-splitting to reduce bundle size
- π€ Lazy-load non-critical JS modules
β 4. Cumulative Layout Shift (CLS)
Target: < 0.1
π Avoid unexpected visual shifts
β Best Practices:
- π² Always define width and height for images/videos
- π Reserve space for dynamic content (ads, iframes)
- π Use font-display: swap to avoid FOIT (Flash of Invisible Text)
- π« Donβt insert DOM elements above existing content after page load
- ποΈ Use
transform, nottop/left, for animations
β 5. Speed Index
Target: < 3.4s
π How fast your page visually completes
β Best Practices:
- β‘ Prioritize visible content first
- π Defer offscreen and background content
- π§© Preload critical resources (fonts, hero images)
- π Minimize redirects & DNS lookups
- π οΈ Reduce dependency size (lodash, moment.js, etc.)
π οΈ Tools You Can Use:
| Tool | Use Case |
|---|---|
| π‘ PageSpeed Insights | Google's official performance audit |
| π Lighthouse (Chrome DevTools) | Local performance & SEO audit |
| β‘ WebPageTest | Visual load progress and request waterfall |
| π§ͺ GTmetrix | Page load speed and suggestions |
| π¦ Bundlephobia | Check size of npm packages |
Top comments (0)