Page Speed & Mobile Optimization
Car Dashboard Warning Lights Explained
Core Web Vitals Targets
Largest Contentful Paint (LCP)
Target: < 2.5 seconds Current Estimate: 3.2 seconds Improvement Actions:- Compress hero images to WebP format (60% reduction)
- Implement lazy loading for below-fold images
- Preload critical CSS and fonts
- Use CDN for static assets
- Enable browser caching (1 year expiry)
First Input Delay (FID)
Target: < 100 milliseconds Current Estimate: 150 milliseconds Improvement Actions:- Defer non-critical JavaScript
- Minify and bundle JavaScript files
- Remove unused CSS/JS
- Use async loading for third-party scripts
- Optimize event listeners
Cumulative Layout Shift (CLS)
Target: < 0.1 Current Estimate: 0.15 Improvement Actions:- Set explicit width/height on all images
- Reserve space for ads before loading
- Use CSS aspect-ratio for images
- Preload web fonts with font-display: swap
- Avoid inserting content above existing content
Image Optimization
Compression Strategy
Format Conversion:- Convert all JPEG/PNG to WebP (70% quality)
- Use AVIF for supported browsers
- Fallback to original format for older browsers
- Hero images: 1200px width, WebP format
- Content images: 800px width, WebP format
- Thumbnail images: 300px width, WebP format
loading="lazy"
width="800"
height="600"
alt="Dashboard warning light example">
CSS & JavaScript Optimization
CSS Optimization
Minification:- Use CSSNano or similar tool
- Remove unused CSS with PurgeCSS
- Combine media queries
- Inline critical CSS for above-fold content
- Load remaining CSS asynchronously
JavaScript Optimization
Bundling:- Use Webpack or Parcel for bundling
- Tree-shaking to remove unused code
- Code splitting for route-based loading
Mobile Responsiveness
Mobile-First Design
Viewport Configuration:
Touch Targets:
- Minimum 44x44px for interactive elements
- Adequate spacing between touch targets
sizes="(max-width: 600px) 400px,
(max-width: 1200px) 800px,
1200px"
src="image-800.webp"
alt="Responsive image">
Performance Monitoring
Tools & Metrics
Google PageSpeed Insights:- Mobile score target: 90+
- Desktop score target: 95+
- Monitor LCP, FID, CLS in real-time
- Set up alerts for regressions
- Automated performance testing
- Block deployments on performance regression
Performance Budget
Page Weight Budget:- Total page size: < 2MB
- JavaScript: < 500KB
- CSS: < 200KB
- Images: < 1.2MB
- Fonts: < 100KB
- Total requests: < 50
- Third-party requests: < 10
Implementation Checklist
- [ ] Convert all images to WebP format
- [ ] Implement lazy loading for images
- [ ] Minify and bundle CSS/JS files
- [ ] Set up CDN for static assets
- [ ] Configure browser caching
- [ ] Implement mobile-first responsive design
- [ ] Set up performance monitoring
- [ ] Create performance budget