A practical guide to website speed optimization — image formats, caching, code splitting, hosting, and Core Web Vitals — to load in under 2 seconds and rank higher.
Short answer: to load under 2 seconds, serve images in AVIF/WebP with set dimensions, enable caching and a CDN, minimize and split JavaScript, use fast hosting, and preload fonts. Together these fix the metrics Google actually ranks on.
Here's how, step by step.
Why Speed Matters
- 53% of mobile visitors abandon a site that takes over 3 seconds to load
- Speed is a confirmed Google ranking factor via Core Web Vitals
- Faster sites convert more: cutting load time from 10s to 2s can lift conversions dramatically
Speed affects both how many people find you and how many buy.
The Three Core Web Vitals
| Metric | Measures | Target |
|---|---|---|
| LCP (Largest Contentful Paint) | Loading | under 2.5s |
| INP (Interaction to Next Paint) | Responsiveness | under 200ms |
| CLS (Cumulative Layout Shift) | Visual stability | under 0.1 |
Fix 1: Optimize Images
Images are the #1 cause of slow pages.
- Convert to AVIF or WebP (60–80% smaller than JPEG/PNG)
- Serve responsive sizes for each device
- Lazy-load below-the-fold images
- Always set width and height to prevent layout shift (CLS)
Fix 2: Enable Caching and a CDN
- Browser caching so repeat visits are instant
- A CDN (Cloudflare, Vercel Edge) to serve assets from near the user
- Cache static pages so the server isn't rebuilding them every request
Fix 3: Minimize and Split JavaScript
- Remove unused scripts and heavy third-party widgets
- Code-split so each page loads only what it needs
- Defer non-critical JS
- Every extra script delays interactivity (INP)
Fix 4: Optimize Fonts
- Preload key fonts
- Use `font-display: swap` to avoid invisible text
- Limit font families and weights
Fix 5: Use Fast Hosting and Rendering
- Choose performance hosting (Vercel, Cloudflare)
- Use server-side rendering or static generation (Next.js) so pages arrive ready
- Reduce time to first byte (TTFB) under 300ms
Fix 6: Reduce Layout Shift (CLS)
- Set dimensions on all images, videos, and embeds
- Reserve space for ads and dynamic content
- Avoid injecting content above existing content
How to Test Your Speed
Use these free tools:
- Google PageSpeed Insights
- Chrome DevTools Lighthouse
- Google Search Console Core Web Vitals report
Test on mobile, on a real 4G connection — not just your office Wi-Fi.
How Nexora Builds Fast Sites
We build on Next.js with automatic image optimization, code splitting, CDN delivery, and static rendering — so our sites target sub-2-second loads and 90+ PageSpeed scores from day one. We also offer speed optimization for existing slow websites.
Contact us for a free performance audit of your current site.
Frequently Asked Questions
What is a good website load time?
Aim for under 2 seconds. 53% of mobile users abandon sites that take longer than 3 seconds, and Google uses speed (Core Web Vitals) as a ranking factor.
What slows down a website the most?
Unoptimized images are the most common cause, followed by heavy JavaScript and third-party scripts, slow hosting, and render-blocking fonts and CSS.
What are Core Web Vitals?
Three Google metrics: LCP (loading, target under 2.5s), INP (responsiveness, under 200ms), and CLS (visual stability, under 0.1). They directly affect rankings.
How do I test my website speed?
Use Google PageSpeed Insights, Chrome DevTools Lighthouse, and the Core Web Vitals report in Google Search Console. Always test on mobile with a real connection.