HomeBlogWebsite Speed Optimisation: The Complete Technical Guide for 2025
Performance

Website Speed Optimisation: The Complete Technical Guide for 2025

A comprehensive technical guide to making your website faster in 2025 — covering CDNs, image optimisation, Core Web Vitals, caching strategies, and how speed affects your WIS performance score.

S
SiteReveal Team
18 February 202512 min read
Share:
Website Speed Optimisation: The Complete Technical Guide for 2025

Website Speed Optimisation: The Complete Technical Guide for 2025

Website speed is not a vanity metric. Google uses Core Web Vitals as a ranking signal. Conversion rate studies consistently show that a one-second improvement in load time increases conversions by 7–12%. And for mobile users on slower connections, a slow website is simply an unusable one.

This guide covers every meaningful lever for improving website performance in 2025 — from the quick wins that take minutes to implement to the architectural changes that require more planning. Each section explains how the optimisation is detected by SiteReveal and how it affects your Performance dimension score.


Understanding the Performance Dimension

SiteReveal's Performance dimension (20% of your WIS) measures five categories of signals:

Signal CategoryWeightWhat Is Measured
CDN presence25%Whether assets are served from a content delivery network
Asset compression20%Whether HTML, CSS, and JS are served with gzip or Brotli compression
Cache-Control headers20%Whether static assets have appropriate caching directives
Image optimisation20%Whether images use modern formats (WebP, AVIF) and are appropriately sized
HTTP/2 or HTTP/315%Whether the connection protocol supports multiplexing

A perfect Performance score requires all five categories to be in good shape. The good news is that most of these can be addressed without changing a single line of application code.


1. Deploy a Content Delivery Network (CDN)

A CDN is the single highest-impact performance improvement for most websites. By serving your static assets (images, CSS, JavaScript, fonts) from servers geographically close to each visitor, a CDN reduces latency from hundreds of milliseconds to tens of milliseconds.

How SiteReveal detects CDN usage: The scanner checks response headers for CDN-specific values (e.g., cf-ray for Cloudflare, x-amz-cf-id for CloudFront, x-cache for Fastly) and inspects the IP addresses of asset requests.

Options by use case:

  • Cloudflare — free tier covers most small-to-medium sites; proxies all traffic and adds security benefits alongside performance
  • AWS CloudFront — best for sites already on AWS infrastructure
  • Fastly — preferred for high-traffic media and e-commerce sites requiring fine-grained cache control
  • Vercel Edge Network / Netlify CDN — automatically included when deploying to these platforms

Score impact: No CDN detected deducts 20 points from the Performance dimension.


2. Enable Compression (Gzip / Brotli)

Compression reduces the size of HTML, CSS, and JavaScript files before they are sent over the network. Brotli typically achieves 15–25% better compression than gzip on text assets.

How to check: In Chrome DevTools → Network, click any HTML or JS file and look for content-encoding: br (Brotli) or content-encoding: gzip in the response headers.

Implementation (Nginx):

nginx
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml;
gzip_min_length 1000;

# Brotli (requires ngx_brotli module)
brotli on;
brotli_types text/plain text/css application/json application/javascript;

Implementation (Express/Node.js):

js
import compression from 'compression';
app.use(compression());

Score impact: No compression detected deducts 15 points from the Performance dimension.


3. Implement Proper Cache-Control Headers

Caching tells browsers and CDNs how long to store a resource before re-fetching it. Without caching headers, every page visit re-downloads all assets — even if they have not changed.

Recommended strategy:

# Immutable assets (hashed filenames — cache forever)
Cache-Control: public, max-age=31536000, immutable

# HTML pages (always revalidate)
Cache-Control: no-cache

# API responses (short cache or no-store)
Cache-Control: no-store

The key insight is that assets with content-hashed filenames (e.g., main.a3f8c2.js) can be cached indefinitely, because any change to the file produces a new filename. HTML pages, by contrast, should never be cached aggressively because they reference those hashed assets.

Score impact: Assets served without Cache-Control headers deduct 15 points from the Performance dimension.


4. Optimise Images

Images typically account for 50–70% of a page's total transfer size. Optimising them is the most impactful single action for improving perceived load time.

Use Modern Image Formats

WebP provides 25–35% smaller file sizes than JPEG at equivalent quality. AVIF provides 50% smaller files than JPEG. Both formats are supported by all modern browsers.

In Next.js: The <Image> component automatically serves WebP/AVIF.

In HTML:

html
<picture>
  <source srcset="hero.avif" type="image/avif">
  <source srcset="hero.webp" type="image/webp">
  <img src="hero.jpg" alt="Hero image">
</picture>

Implement Lazy Loading

Images below the fold should not be loaded until the user scrolls near them:

html
<img src="product.webp" alt="Product" loading="lazy" width="800" height="600">

Set Explicit Dimensions

Always include width and height attributes on images. This allows the browser to reserve space before the image loads, preventing layout shift (which affects Cumulative Layout Shift, a Core Web Vitals metric).

Score impact: Images without modern formats or without explicit dimensions deduct up to 15 points from the Performance dimension.


5. Upgrade to HTTP/2 or HTTP/3

HTTP/2 allows multiple requests to be sent over a single connection simultaneously (multiplexing), eliminating the "head-of-line blocking" that slows HTTP/1.1 sites. HTTP/3 further improves performance on unreliable connections by using QUIC instead of TCP.

How to check: In Chrome DevTools → Network, the "Protocol" column shows h2 (HTTP/2) or h3 (HTTP/3).

Implementation: HTTP/2 is supported by all modern web servers (Nginx 1.9.5+, Apache 2.4.17+) and is automatically enabled on most CDNs and cloud platforms. If you are still on HTTP/1.1, upgrading is typically a single configuration change.

Score impact: HTTP/1.1 detected deducts 10 points from the Performance dimension.


6. Core Web Vitals: The Three Metrics That Matter for SEO

Google's Core Web Vitals are three specific performance metrics that directly affect search rankings:

Largest Contentful Paint (LCP)

LCP measures how long it takes for the largest visible element (usually a hero image or headline) to load. Target: under 2.5 seconds.

How to improve LCP:

  • Preload the hero image: <link rel="preload" as="image" href="hero.webp">
  • Serve the hero image from a CDN
  • Use a server-side rendered or statically generated page so the HTML arrives quickly

Cumulative Layout Shift (CLS)

CLS measures how much the page layout shifts during loading. Unexpected shifts are jarring and cause misclicks. Target: under 0.1.

How to improve CLS:

  • Set explicit width and height on all images and videos
  • Reserve space for ads and embeds with CSS aspect-ratio
  • Avoid inserting content above existing content after load

Interaction to Next Paint (INP)

INP replaced First Input Delay in March 2024. It measures the responsiveness of the page to user interactions. Target: under 200ms.

How to improve INP:

  • Break up long JavaScript tasks (anything over 50ms)
  • Defer non-critical JavaScript with async or defer
  • Use a web worker for CPU-intensive operations

7. Reduce JavaScript Bundle Size

JavaScript is the most expensive resource type — not just in bytes, but in CPU time required to parse and execute it. A 200KB JavaScript file takes significantly more processing time than a 200KB image.

Practical steps:

  1. Tree-shake unused code — modern bundlers (Vite, webpack, esbuild) eliminate unused exports automatically when you use ES modules
  2. Code-split by route — load only the JavaScript needed for the current page, not the entire application
  3. Audit third-party scripts — each analytics tag, chat widget, and A/B testing script adds weight; audit regularly and remove what you are not actively using
  4. Use async and defer — non-critical scripts should not block HTML parsing

Measuring Your Progress

After implementing these optimisations, measure the impact using:

  • SiteRevealre-scan your site to see your updated Performance dimension score
  • Google PageSpeed Insights — provides Core Web Vitals data from real Chrome users (field data) and a lab test
  • WebPageTest — detailed waterfall charts showing exactly which resources are slow
  • Chrome DevTools Lighthouse — run locally for fast iteration during development

A well-optimised site should achieve a Performance dimension score of 80+ on SiteReveal and pass all three Core Web Vitals thresholds. If your score is still below 70 after implementing the above, the most common remaining culprits are unoptimised images, missing CDN coverage, or a large unoptimised JavaScript bundle.

performancespeedCDNcore-web-vitalscachingoptimisation

See how your website scores

Get a free Website Intelligence Score™ covering security, performance, SEO, and technology stack.

SiteReveal TeamAuthor

The SiteReveal team builds tools that help developers, marketers, and founders understand what's really happening under the hood of any website — from security posture to performance bottlenecks and technology stack fingerprinting.