Page speed is a confirmed Google ranking factor for both desktop and mobile searches. More importantly, site performance directly impacts user experience, bounce rate, and conversions. Studies show that even a 1-second delay in page load time can reduce conversions by 7%.
53% of mobile users abandon sites that take longer than 3 seconds to load
Pages loading in 1-2 seconds have the highest conversion rates
Improving Core Web Vitals by 10% can increase organic traffic by 5-10%
Amazon found that every 100ms delay cost them 1% in sales
Core Web Vitals are Google's official metrics for measuring page experience. They became a ranking signal in 2021 and continue to gain importance.
LCP measures how long it takes for the largest content element (image, video, or text block) to become visible in the viewport. Target: under 2.5 seconds.
FID measures the time from when a user first interacts with your page to when the browser can respond. INP is replacing FID in 2024. Target: <100ms (FID) or <200ms (INP).
CLS measures visual stability - how much elements shift around unexpectedly as the page loads. Target: <0.1.
/* Reserve space for images to prevent layout shift */
img, video {
width: 100%;
height: auto;
aspect-ratio: 16 / 9;
}
/* Prevent font swap layout shift */
@font-face {
font-family: 'CustomFont';
src: url('font.woff2') format('woff2');
font-display: swap;
}Images typically account for 50-70% of page weight. Optimizing images is the #1 way to improve page speed.
<picture> <source srcset="image.avif" type="image/avif"> <source srcset="image.webp" type="image/webp"> <img src="image.jpg" alt="Description" width="800" height="600"> </picture>
Serve different image sizes based on screen size to avoid loading huge images on mobile.
<img
src="image-800.jpg"
srcset="image-480.jpg 480w,
image-800.jpg 800w,
image-1200.jpg 1200w"
sizes="(max-width: 600px) 480px,
(max-width: 1000px) 800px,
1200px"
alt="Responsive image"
width="1200"
height="675"
loading="lazy"
/>Defer loading offscreen images until user scrolls near them.
JavaScript is often the biggest performance bottleneck, especially on mobile devices with limited CPU power.
Split JavaScript into smaller chunks that load only when needed.
// Dynamic import - loads only when needed
const HeavyComponent = lazy(() => import('./HeavyComponent'));
// Route-based splitting
const AdminPanel = lazy(() => import('./AdminPanel'));
function App() {
return (
<Suspense fallback={<Loading />}>
{isAdmin && <AdminPanel />}
</Suspense>
);
}Control when and how JavaScript loads to prevent blocking page render.
<!-- Defer: maintains execution order --> <script defer src="app.js"></script> <!-- Async: executes ASAP --> <script async src="analytics.js"></script> <!-- Critical inline script --> <script> // Critical functionality here </script>
CSS blocks rendering, so optimizing CSS delivery is crucial for fast page loads.
Inline only the CSS needed for above-the-fold content, defer the rest.
Custom fonts can add 100-400KB and cause layout shifts.
/* Optimal font loading */
@font-face {
font-family: 'CustomFont';
src: url('font.woff2') format('woff2');
font-weight: 400;
font-display: swap;
}
/* Preload in HTML */
<link rel="preload" href="font.woff2" as="font" type="font/woff2" crossorigin>A slow server negatively impacts all performance metrics. Server response time should be under 200ms.
Caching stores copies of files to serve them faster on repeat visits.
Each file (CSS, JS, image) requires a separate HTTP request. Fewer requests = faster loading.
Mobile devices have slower CPUs and network connections. Optimize specifically for mobile.
Solution: Run PageSpeed Insights and WebPageTest first. Measure improvements after changes. Focus on metrics that matter most.
Solution: Compress all images. Use WebP format. Implement responsive images with srcset. Lazy load offscreen images.
Solution: Inline critical CSS. Defer non-critical JavaScript. Use async for third-party scripts.
Solution: Use Cloudflare (free) or another CDN to serve static assets from edge locations near users.
Solution: Enable browser caching, server caching, and CDN caching. Set long cache times for static assets.
Solution: Audit all third-party scripts. Remove unnecessary ones. Load remaining scripts asynchronously or defer them.
Solution: Always specify width and height attributes on images to prevent layout shifts (CLS).
Solution: Desktop Chrome DevTools doesn't accurately simulate mobile performance. Test on real devices with real network conditions.
Tests page speed and Core Web Vitals. Provides specific optimization recommendations.
Best for: Primary performance testing tool, monitoring Core Web Vitals
Detailed performance testing with waterfall charts, filmstrip view, and multiple locations.
Best for: Deep performance analysis, testing from different locations
Browser developer tools with Performance, Network, and Coverage panels.
Best for: Debugging performance issues, finding unused code, analyzing network requests
Automated testing tool (built into Chrome DevTools and PageSpeed Insights).
Best for: Comprehensive site audits including performance, SEO, accessibility
Performance testing with detailed waterfall and recommendations.
Best for: Testing page speed, analyzing resources, monitoring performance over time
Image compression tools that reduce file size without quality loss.
Best for: Compressing images before uploading
CDN and performance optimization platform with free plan.
Best for: CDN, caching, Brotli compression, image optimization
Chrome extension showing Core Web Vitals metrics in real-time.
Best for: Monitoring LCP, FID/INP, CLS while browsing