Website Speed — How to Improve Loading Time and Why It Matters
Website speed decides whether a visitor sees your offer at all before running out of patience. Google measures it with three Core Web Vitals metrics — LCP, INP, and CLS — and uses them in its ranking systems. Speed is not a luxury. It's a foundation.
Why Website Speed Matters
Website speed matters for two reasons: for people and for the search engine. Google writes that Core Web Vitals are used by its ranking systems and recommends achieving good scores for success with Search (Google's documentation on Core Web Vitals). The same metrics describe what the user feels: how long they wait for content, how quickly the page reacts to a click, and whether the layout jumps around.
In the audits we run for clients, speed is usually the first place lost conversions are hiding — before anyone gets around to judging the copy, the offer, or the CTA. We check Core Web Vitals before we talk about anything else. Because for the average business, this means one thing: website speed directly affects the number of clients and revenue. Not indirectly, not "maybe someday" — directly and measurably.
Core Web Vitals — The Metrics That Truly Matter
Core Web Vitals are three metrics Google uses to assess the user experience on a page: loading speed (LCP), responsiveness to interactions (INP), and layout stability (CLS). This isn't just "another thing to optimize": Google writes that its ranking systems use them. The thresholds below come from the description of the metrics on web.dev and apply to the 75th percentile of visits.
LCP (Largest Contentful Paint) — Time to Display Main Content
What it measures: How long it takes from clicking a link until the largest element on the page (heading, hero image) is visible on screen.
Targets:
| Score | Rating |
|---|---|
| Up to 2.5s | Good (green) |
| 2.5-4.0s | Needs improvement (orange) |
| Above 4.0s | Poor (red) |
Most common causes of slow LCP:
- Large, unoptimized images (the most common cause)
- Slow server response (TTFB)
- Render-blocking CSS/JavaScript
- Lack of preloading critical resources
INP (Interaction to Next Paint) — Responsiveness
What it measures: How long it takes from the moment a user clicks a button or link until the browser begins to respond. Since March 2024, Google replaced FID with the more demanding INP (Interaction to Next Paint) metric.
INP targets:
| Score | Rating |
|---|---|
| Up to 200ms | Good |
| 200-500ms | Needs improvement |
| Above 500ms | Poor |
Most common causes of slow INP:
- Heavy JavaScript blocking the main thread
- Too many event listeners
- Large frameworks (Angular, unoptimized React)
- Third-party scripts (analytics, chat, remarketing)
CLS (Cumulative Layout Shift) — Visual Stability
What it measures: Whether page elements "jump" during loading. You click "Submit," but suddenly an ad loads above it and you click on the ad instead of the form.
Targets:
| Score | Rating |
|---|---|
| Up to 0.1 | Good |
| 0.1-0.25 | Needs improvement |
| Above 0.25 | Poor |
Most common causes of high CLS:
- Images without defined dimensions (width/height)
- Fonts that change text size after loading (FOUT)
- Dynamically injected content (ads, popups)
- Embeds without reserved space
How to Check Your Site's Speed
Before you start optimizing, you need to know where you stand. Three tools you must know:
1. PageSpeed Insights (pagespeed.web.dev) Google's official tool. Shows field data from real users from the Chrome User Experience Report and a Lighthouse lab test (PageSpeed Insights documentation). Start with the field data, and check the mobile and desktop versions separately. We explain how to read both kinds of data in our piece on field and lab data in PageSpeed Insights.
2. Google Search Console The "Core Web Vitals" section shows how many of your pages meet the thresholds and how many don't. This is a site-wide view, not a single page.
3. Lighthouse (in Chrome DevTools) Press F12 → Lighthouse tab → Generate report. Detailed analysis with specific recommendations. Remember: test in incognito mode (browser extensions distort results).
Image Optimization — The Fastest Way to Speed Up Your Site
Images are the most common cause of slow loading we see in audits. On many business websites they're the largest files, and optimizing them is usually the fastest and easiest way to improve Core Web Vitals.
Format: WebP or AVIF
According to Google's documentation on the WebP format, lossless WebP is 26% smaller than PNG, and lossy WebP is 25–34% smaller than a comparable JPEG at equivalent quality measured by the SSIM index. AVIF is a newer format that usually compresses even more; it's worth serving it with WebP or JPEG as a fallback for older browsers.
WebP is the minimum in 2026. Keep PNG for graphics that genuinely need lossless quality, and serve photos in modern formats.
Responsive Images (srcset)
Don't serve a 2000px wide image on a phone with a 375px screen. Use the srcset attribute so the browser automatically selects the appropriate size:
<img
src="hero-800.webp"
srcset="hero-400.webp 400w, hero-800.webp 800w, hero-1600.webp 1600w"
sizes="(max-width: 768px) 100vw, 50vw"
width="800" height="450"
alt="Image description"
loading="lazy"
/>
Lazy Loading
Images below the visible screen don't need to load immediately. Add loading="lazy" — the browser will load them only when the user scrolls close to them.
Exception: The hero image (LCP element) should have loading="eager" or fetchpriority="high" — it must load as quickly as possible.
Image Dimensions
Always define width and height in HTML. Without this, the browser doesn't know how much space to reserve, and content "jumps" after the image loads (CLS).
JavaScript — The Silent Speed Killer
Images are the visible problem. JavaScript is the invisible but often more serious one. Business websites often load more JavaScript than they need, and a large share of it is third-party scripts (analytics, remarketing, chat, social media).
JavaScript Audit
Open Chrome DevTools → Network → filter by JS. Sort by size. You'll be surprised how much you load and how little of it you actually need.
Specific Reduction Techniques
In client audits, item 4 below turns out to be surprisingly common: a company paying for ads that lead to a page still dragging dead code from a campaign that ended years ago. Here are five techniques we actually use:
1. Lazy loading third-party scripts. Google Analytics, Facebook Pixel, Hotjar — they don't need to load immediately. Load them after user interaction (scroll, click) or with a 3-5 second delay.
2. Code splitting. Don't load the entire application on every page. Next.js and Astro do this automatically — each page loads only the code it needs.
3. Tree shaking. Are you importing an entire library to use one function? Modern bundlers (webpack, esbuild, Rollup) remove unused code — but only if you import selectively: import { debounce } from 'lodash-es', not import _ from 'lodash'.
4. Removing unused scripts. Installed a chat widget but turned it off? The script still loads. Had a remarketing campaign 2 years ago? The pixel is still tracking. Clean up.
5. Switching to a lighter framework. If your site is mainly static content (blog, landing page), you don't need the full React runtime on every subpage. Astro ships no JavaScript to the browser by default. Next.js with 'use client' only where needed — that's a reasonable compromise.
Server and Hosting — The Foundation You Can't Skip
You can optimize images and JavaScript to perfection, but if the server responds after 2 seconds — nothing will help.
TTFB (Time to First Byte)
This is the time from the browser's request to the first byte of the server's response. Rough target according to web.dev: 0.8 seconds or less (web.dev on TTFB). TTFB isn't a Core Web Vitals metric, but a slow server delays everything that happens afterward, including LCP.
| Hosting type | Comment |
|---|---|
| Shared hosting (cheapest) | Shared resources, unpredictable performance |
| VPS | Dedicated resources, self-managed |
| CDN + static hosting | Files served from the location nearest the user |
If your site is static (SSG), a CDN changes the rules of the game. Instead of one server in one city, your site is served from many locations, and the user gets files from the nearest one.
Our own site runs exactly on this model: a static Next.js export, zero server to query at runtime, files served from an edge CDN. That's not a marketing choice for show — it's the only way to make TTFB stop being something you have to worry about.
Compression: gzip vs Brotli
The server should compress responses. Brotli usually compresses text files better than gzip and is supported by modern browsers; gzip stays as a fallback.
HTTP/2 and HTTP/3
HTTP/2 allows downloading multiple files simultaneously (multiplexing). HTTP/3 adds QUIC — faster connection establishment. Most modern hosting supports both. If your hosting still uses HTTP/1.1 — switch hosting.
Fonts — A Detail That Makes a Difference
Fonts are a subtle but real cause of CLS and LCP problems.
The Problem: FOUT and FOIT
- FOUT (Flash of Unstyled Text): Text displays in a system font, then jumps to the custom font. Causes CLS.
- FOIT (Flash of Invisible Text): Text is invisible until the font loads. The user sees a blank page.
Solutions
1. font-display: swap — display text immediately in a system font, swap to custom font after loading. Eliminates FOIT.
2. Preload critical fonts:
<link rel="preload" href="/fonts/inter.woff2" as="font" type="font/woff2" crossorigin>
3. Limit the number of fonts. Maximum 2 fonts (headings + body text). Each additional typeface and weight is another file to download.
4. Use WOFF2 format. WOFF2 compresses better than WOFF. Don't load TTF or OTF in the browser.
5. Subset fonts. If you only need Latin characters — load only the Latin subset, not every glyph the typeface has.
CSS — The Optimization That Gets Forgotten
CSS is rarely the main culprit, but it can lower your scores.
1. Critical CSS inline. The styles needed for rendering above-the-fold content should be in a <style> tag in <head>, not in an external file. Eliminates render-blocking CSS.
2. Remove unused CSS. Sites built on feature-heavy themes often load styles a given page never uses. Tools: PurgeCSS, Coverage tab in Chrome DevTools.
3. Minification. cssnano, clean-css — removes comments, whitespace, shortens color names.
4. Avoid @import. @import in CSS causes sequential loading (waterfall). Use <link> in HTML or bundle CSS in the build step.
Speed Optimization Checklist
This is the exact list we go through in speed audits for clients — not an academic checklist, a working one. Go through it point by point:
Images:
- WebP or AVIF format
- Responsive sizes (srcset)
- Lazy loading on images below the fold
- Defined width/height
- Hero image with fetchpriority="high"
JavaScript:
- Third-party scripts loaded with delay
- Code splitting (each page loads only its own code)
- No unused scripts
- Bundle size under 200KB (gzipped)
Server:
- TTFB of about 0.8 s or less (web.dev rough threshold)
- Brotli compression
- HTTP/2 or HTTP/3
- CDN
Fonts:
- Max 2 fonts
- WOFF2 format
- font-display: swap
- Preload critical fonts
CSS:
- Critical CSS inline
- Unused CSS removed
- Minified
Targets:
- LCP up to 2.5 s in field data
- INP up to 200 ms
- CLS under 0.1
- Core Web Vitals assessment passed in Search Console and PageSpeed Insights (field data, not a Lighthouse score)
Speed and SEO — Why Google Cares How Fast Your Site Loads
Google writes that Core Web Vitals are used by its ranking systems. But the impact is more nuanced than you might think.
Direct impact: Core Web Vitals are one of many signals. According to Google's documentation, there is no single page experience signal, and Search always seeks to show the most relevant content, even if the page experience is sub-par (Google's documentation on page experience). Speed won't replace content that matches the query.
Impact on users: a slow site means more people give up before they see your offer. That shows in your analytics and in your inquiries, even before anything changes in rankings.
Crawl budget: on large sites, server speed affects how many pages Google fetches. When responses slow down or server errors appear, Google lowers its limit and crawls less; when the site keeps responding quickly, the limit goes up (Google's documentation on crawl budget). Google addresses that guide to large sites: roughly 1 million+ pages, or 10,000+ pages with content that changes daily. More about this in our article on SEO basics and SEO audit.
Summary
In 2026, a fast website is not a competitive advantage — a slow website is a flaw. Users don't wait for a page that won't load. Google recommends keeping Core Web Vitals within the good thresholds. Every unnecessary delay risks losing clients.
The good news: most speed issues are solved by well-known techniques. Image optimization, lazy loading, CDN — it's not rocket science. It's hygiene. Which is exactly why we treat it as a foundation, not a premium add-on — if a site is slow, everything else you optimize on top of it stops mattering.
You can check this on our own site: a static Next.js export, deployed on an edge CDN, no server to query at runtime. We don't sell "a fast website" as a pitch line — we build every client site on the same foundation.
Want to know how much you're losing from a slow site? Request a free speed audit — we'll check your site's Core Web Vitals and show you specific areas for improvement.
Want similar results? Get a free quote.