Overview
Performance rules ensure your website loads quickly and provides a smooth user experience. Fast sites rank better in search results and have higher conversion rates.Performance Impact: A 1-second delay in page load time can reduce conversions by 7%, page views by 11%, and customer satisfaction by 16%.
Compression
Rule: perf/compression
What it checks:
- Gzip or Brotli compression enabled
- Text resources compressed (HTML, CSS, JS, JSON, XML, SVG)
- Compression ratio (target: 60-80% reduction)
Common Issues & Fixes
Common Issues & Fixes
Issue: No compression (2KB HTML served uncompressed)Fix for Nginx:Fix for Apache:Fix for Cloudflare/Vercel/Netlify:Compression is enabled by default. Ensure it’s not disabled in settings.
Brotli vs Gzip: Brotli compresses 15-20% better than gzip but requires more CPU. Use Brotli for static assets, gzip as fallback.
JavaScript & CSS Optimization
Rule: perf/js-minify
What it checks:
- JavaScript files are minified
- No inline comments in production
- No console.log statements
- Dead code eliminated
Common Issues
Common Issues
Issue: Unminified JavaScript (3866.6 KB with ~2922.3 KB savings possible, 193 comments found)This is a massive performance issue—you’re serving nearly 3 MB of unnecessary data.Fix:Build tools:
Rule: perf/css-size
What it checks:
- CSS file size (target: <100 KB per file)
- Unused CSS detected and removed
- Critical CSS inlined
- Non-critical CSS deferred
Common Issues
Common Issues
Issue: CSS file too large (146.2 KB
index-CHQ_j4kp.css)Solutions:- Purge unused CSS with PurgeCSS:
- Split critical/non-critical CSS:
- Code split by route:
Caching
Rule: perf/cache-headers
What it checks:
- Cache-Control headers present
- Appropriate cache durations
- Immutable assets properly cached
- No caching on dynamic content
Common Issues
Common Issues
Issue: No cache headers (Zero caching on static assets)Fix for Nginx:Fix for Vercel/Next.js:Recommended Cache Durations:
| Resource Type | Cache Duration | Cache-Control |
|---|---|---|
| Immutable assets (versioned) | 1 year | public, max-age=31536000, immutable |
| Images | 1 year | public, max-age=31536000 |
| Fonts | 1 year | public, max-age=31536000 |
| CSS/JS (versioned) | 1 year | public, max-age=31536000, immutable |
| HTML | No cache or short | no-cache or max-age=3600 |
| API responses | Varies | private, max-age=300 (5 min) |
Page Weight
Rule: perf/page-weight
What it checks:
- Total page size (target: <2 MB)
- Number of requests (target: <50)
- Largest Contentful Paint (LCP) element size
Common Issues
Common Issues
Issue: Heavy page weight (4013 KB total resources)Target: <2000 KBSolutions:
-
Optimize images:
- Use WebP/AVIF formats (60-80% smaller than JPEG/PNG)
- Compress images (TinyPNG, ImageOptim)
- Serve responsive images with
srcset - Lazy load below-the-fold images
-
Tree-shake JavaScript:
-
Code split by route:
- Only load code needed for current page
- Lazy load modals, tooltips, charts
-
Remove unused dependencies:
Critical Rendering Path
Rule: perf/render-blocking
What it checks:
- CSS doesn’t block rendering
- JavaScript is deferred or async
- Critical resources loaded first
Fix Render-Blocking Resources
Fix Render-Blocking Resources
Issue: Critical request chain (CSS blocks rendering)Solutions:
- Inline critical CSS:
- Defer JavaScript:
- Preload critical resources:
Source Maps in Production
Rule: perf/source-maps
What it checks:
- No .map files exposed in production
- Source maps not referenced in production builds
Fix Source Maps
Fix Source Maps
Issue: Source maps exposed (Production source maps accessible)Remove source maps from production:Alternative: Upload source maps to error tracking (without exposing them):
Core Web Vitals
What they measure:
Largest Contentful Paint (LCP)
Largest Contentful Paint (LCP)
Target: <2.5 secondsMeasures when the largest content element becomes visible.Common issues:
- Large images without optimization
- Render-blocking CSS/JS
- Slow server response time
- Optimize images (WebP, compression, lazy loading)
- Use CDN for static assets
- Inline critical CSS
- Preload LCP image:
<link rel="preload" href="hero.jpg" as="image">
First Input Delay (FID)
First Input Delay (FID)
Target: <100 millisecondsMeasures time from first user interaction to browser response.Common issues:
- Heavy JavaScript execution blocking main thread
- Long tasks (>50ms)
- Break up long tasks
- Defer non-critical JavaScript
- Use Web Workers for heavy computation
- Code split to reduce initial JS payload
Cumulative Layout Shift (CLS)
Cumulative Layout Shift (CLS)
Target: <0.1Measures visual stability (unexpected layout shifts).Common issues:
- Images without dimensions
- Ads/embeds inserted dynamically
- Web fonts causing FOIT/FOUT
- Set width/height on images:
<img width="800" height="600" ...> - Reserve space for ads/embeds with CSS
- Use
font-display: swapfor web fonts - Preload fonts:
<link rel="preload" href="font.woff2" as="font" crossorigin>
Testing Performance
PageSpeed Insights
Google’s official tool for Core Web Vitals and performance metrics
WebPageTest
Detailed waterfall charts and filmstrip view
Lighthouse
Built into Chrome DevTools, comprehensive audits
GTmetrix
Performance reports with actionable recommendations
Quick Reference
| Metric | Target | Critical |
|---|---|---|
| Page size | <2 MB | <3 MB |
| Requests | <50 | <100 |
| LCP | <2.5s | <4s |
| FID | <100ms | <300ms |
| CLS | <0.1 | <0.25 |
| Time to Interactive | <3.8s | <7.3s |
Related Pages
Security Rules
Security headers, HTTPS, and vulnerability protection
Technical SEO
Sitemaps, robots.txt, and crawlability
Running Audits
Learn how to run performance audits
Interpreting Results
Understand performance scores and prioritize fixes