| name | optimize-website |
| description | Audit and optimize website performance / speed |
Optimize Website Performance
Systematic checklist for auditing and optimizing web performance. Focuses on Core Web Vitals — LCP, CLS, INP — and general asset/network efficiency.
Pre-Audit
Before optimizing, establish a baseline:
- Identify the tech stack — framework, hosting, CSS approach, build tool
- Run Lighthouse (or PageSpeed Insights) and record scores
- Check Core Web Vitals in Chrome DevTools → Performance tab
- Note the LCP element — this is your highest-priority target
Optimization Checklist
Work through each section top-to-bottom. Items are ordered by typical impact.
1. Largest Contentful Paint (LCP)
The single most impactful metric. Target: < 2.5s.
2. Images
Images are usually the largest payload. Optimize aggressively.
3. Fonts
Web fonts are a common source of render-blocking and layout shift.
4. Cumulative Layout Shift (CLS)
Target: < 0.1. Prevent elements from moving after render.
5. JavaScript
6. CSS
7. Caching & Network
8. Server & Hosting
9. Interaction to Next Paint (INP)
Target: < 200ms. Ensure the page responds quickly to user input.
Post-Optimization
- Re-run Lighthouse and compare against baseline
- Test on real devices — throttled 4G, mid-range mobile
- Check for regressions — visual diff, CLS on navigation
- Monitor in production — use Web Vitals API or RUM (Real User Monitoring)
Quick Wins Summary
| Action | Typical Impact |
|---|
| Preload LCP resource | LCP -0.5–2s |
| Convert images to WebP/AVIF | 50-90% smaller |
| Switch to system fonts | LCP -0.3–1s |
| Enable Brotli compression | 15-25% smaller |
| Add Cache-Control headers | Repeat visits |
| Remove unused JS/CSS | Varies widely |