← Back to Technical Skills

Performance Optimisation for SEO

📚 35 min readUpdated November 2025

In 2025, website performance isn't merely a technical consideration — it's a business imperative directly influencing search rankings, user retention, and revenue. Companies lose 8–35% in revenue, rankings, and conversions due to poor Core Web Vitals. With only 47% of websites meeting Google's performance requirements, mastering optimisation creates genuine competitive advantage. For blockchain platforms where trust and professionalism are paramount, exceptional performance signals technical competence and user respect.

The Performance-SEO Nexus in 2025

Google's integration of Core Web Vitals into its ranking algorithm fundamentally transformed search engine optimisation. Whilst compelling content and authoritative backlinks remain crucial, technical performance now directly influences visibility in search results. Slow-loading websites suffer reduced rankings regardless of content quality, whilst fast, responsive sites gain algorithmic favour that translates to increased organic traffic.

The relationship between performance and business outcomes extends beyond search rankings. Faster websites convert better: Amazon found every 100ms of latency costs them 1% in sales, whilst Google discovered a 500ms delay in search results decreased traffic by 20%. For blockchain platforms competing in a crowded market, performance optimisation represents one of the highest-ROI technical investments available.

This comprehensive guide examines the essential performance optimisation techniques required for SEO success in 2025 — Core Web Vitals, image optimisation strategies, JavaScript bundle optimisation, resource hints and font loading, Next.js 15-specific optimisations, and the relationship between Lighthouse scores and search rankings.

Understanding Core Web Vitals

Core Web Vitals represent Google's attempt to quantify user experience through measurable performance metrics. In March 2024, Google replaced First Input Delay (FID) with Interaction to Next Paint (INP). The current Core Web Vitals consist of three essential metrics: Largest Contentful Paint (LCP), Interaction to Next Paint (INP), and Cumulative Layout Shift (CLS).

Core Web Vitals: 2025 Thresholds

  • Largest Contentful Paint (LCP): Under 2.5 seconds — how long the main content takes to load
  • Interaction to Next Paint (INP): Under 200 milliseconds — how quickly the page responds to interactions throughout its lifecycle
  • Cumulative Layout Shift (CLS): Under 0.1 — visual stability; how much content moves whilst loading
  • Industry Performance: Only 47% of websites meet all three requirements in 2025
  • Business Impact: Poor Core Web Vitals cost companies 8–35% in revenue, rankings, and conversions

Largest Contentful Paint (LCP) Optimisation

LCP measures the time from when a user initiates navigation to when the largest content element becomes visible in the viewport. This metric directly reflects perceived loading speed — users judge performance by when they can see and engage with meaningful content, not when every resource finishes downloading.

The LCP element varies by page but typically includes hero images, large text blocks, or video thumbnails. Chrome DevTools' Performance panel highlights LCP elements, whilst PageSpeed Insights reports LCP timing alongside specific recommendations.

LCP Optimisation Strategies

  • Image Optimisation: Switch to WebP or AVIF formats offering 30–50% smaller file sizes than JPEG/PNG
  • Server Response Time: Reduce Time to First Byte (TTFB) through CDN usage, edge caching, and server optimisation
  • Eliminate Render-Blocking Resources: Defer non-critical CSS and JavaScript to prioritise above-the-fold content
  • Resource Prioritisation: Use <link rel="preload"> for critical resources like LCP images and fonts
  • Lazy Loading: Implement for below-the-fold media (but never for LCP elements)
  • CSS/JS Minification: Reduce file sizes and parsing time
  • Browser Caching: Leverage appropriate cache headers for static assets

A critical mistake is lazy loading LCP elements. Whilst lazy loading improves performance for below-the-fold images, applying it to the LCP element delays its loading, harming the very metric you're trying to optimise. Always ensure LCP elements load eagerly with appropriate priority hints.

Real-world impact: The Economic Times improved LCP by 80% to 2.5 seconds through systematic optimisation, contributing to a 43% overall reduction in bounce rates.

Interaction to Next Paint (INP) Optimisation

INP replaced FID in March 2024 to provide a more comprehensive measure of responsiveness. Whilst FID only measured the first interaction, INP considers all interactions throughout the page lifecycle and reports the worst one. INP measures the time from when a user interacts (clicking, tapping, typing) to when the browser can paint the next frame showing the result.

INP Optimisation Techniques

  • Minimise Third-Party Scripts: Analytics, advertising, and social widgets often block the main thread — audit and remove non-essential scripts
  • Defer Non-Critical JavaScript: Use defer or async to prevent scripts blocking interactivity
  • Web Workers: Offload computationally intensive tasks from the main thread, keeping the UI responsive
  • Break Long Tasks: Tasks exceeding 50ms block interactions — break them up with setTimeout or requestIdleCallback
  • Optimise Event Handlers: Debounce or throttle frequent events like scroll and resize
  • Code Splitting: Load only the JavaScript needed for the current page
  • Input Handling Optimisation: Streamline handlers to complete quickly, deferring heavy processing until after visual feedback

Modern browsers use cooperative scheduling where the main thread must periodically yield to process inputs and render updates. Tasks exceeding 50ms monopolise the thread. By breaking long tasks into smaller units with periodic yields, you maintain responsiveness even during complex operations. Optimising event handlers and breaking long tasks can reduce INP from 350ms to 120ms.

Cumulative Layout Shift (CLS) Optimisation

CLS measures visual stability by quantifying how much visible content shifts during page load. Every unexpected shift frustrates users — text jumps as they're reading, buttons move as they're clicking. CLS is calculated by multiplying the impact fraction by the distance fraction. The target is keeping CLS below 0.1 across the entire page lifecycle.

CLS Optimisation Best Practices

  • Set Image Dimensions: Always include width and height so browsers can reserve space before loading
  • Reserve Space for Ads: Allocate fixed space for ad slots to prevent shifts when ads load
  • Preload Fonts: Use <link rel="preload"> and font-display: swap to prevent invisible text
  • Avoid Injecting Content: Don't insert content above existing content unless responding to user interaction
  • CSS Aspect Ratios: Use the aspect-ratio property for responsive images
  • Animations: Prefer CSS transforms and opacity changes that don't trigger layout recalculations
  • Reserve Dynamic Content Space: Allocate space for embeds, widgets, and late-loading images

Font loading is a common CLS culprit. When custom fonts load late, browsers swap from fallback fonts, often changing text dimensions and causing shifts. Using font-display: swap makes text immediately visible with fallback fonts, whilst preloading ensures custom fonts load quickly. The Economic Times improved CLS by 250% to 0.09 through systematic optimisation.

Modern Image Optimisation Techniques

Images typically constitute the largest portion of web page weight, making image optimisation one of the highest-impact performance improvements available. Modern formats, responsive sizing, and lazy loading combine to dramatically reduce bandwidth without sacrificing visual quality.

Next-Generation Image Formats: WebP and AVIF

WebP, developed by Google, provides 25–35% better compression than JPEG for photographs. AVIF achieves approximately 50% smaller file sizes than JPEG and 20–30% smaller than WebP at comparable quality. A 500KB JPEG hero image becomes ~325KB as WebP or ~250KB as AVIF.

Modern Image Format Comparison (2025)

  • JPEG: Baseline format, universal support, largest file sizes for given quality
  • WebP: 25–35% smaller than JPEG, excellent browser support (96%+), safe primary format
  • AVIF: 50% smaller than JPEG, 20–30% smaller than WebP, growing support (85%+ in 2025)
  • WordPress Integration: WebP since v5.8, AVIF since v6.5
  • Implementation Strategy: Use AVIF with WebP and JPEG fallbacks for maximum compatibility
<picture>
  <source srcset="hero.avif" type="image/avif">
  <source srcset="hero.webp" type="image/webp">
  <img src="hero.jpg" alt="Hero image" width="1200" height="630">
</picture>

Responsive Images with srcset

Serving the same large image to both desktop monitors and mobile phones wastes bandwidth. The srcset attribute enables browsers to select appropriately sized images based on viewport dimensions and device pixel density.

<img
  srcset="hero-400.webp 400w, hero-800.webp 800w, hero-1200.webp 1200w"
  sizes="(max-width: 600px) 100vw, (max-width: 1200px) 50vw, 33vw"
  src="hero-800.jpg"
  alt="Hero image" width="1200" height="630" loading="lazy">

Lazy Loading for Below-the-Fold Images

Loading all images immediately wastes bandwidth on images users might never see. Native lazy loading, supported by all modern browsers, requires only adding loading="lazy" — browsers defer loading until images near the viewport, typically within 1–2 viewport heights of visibility. For advanced scenarios, the IntersectionObserver API provides programmatic control.

JavaScript Bundle Optimisation

Large JavaScript bundles slow page loads, increase parsing time, and block user interactions. Download time increases linearly with file size; browsers must parse and compile JavaScript before execution (CPU-intensive, blocks the main thread); and execution itself delays interactivity. The solution isn't eliminating JavaScript but optimising how it's delivered.

Code Splitting: Loading JavaScript on Demand

Code splitting divides large bundles into smaller chunks loaded independently. Users initially download only code required for the current page; additional code loads on demand as they navigate or interact.

Code Splitting Benefits

  • Faster Initial Load: Smaller bundles download, parse, and execute faster — improving LCP and INP
  • Better Caching: Changing one feature doesn't invalidate the entire bundle
  • Network Efficiency: Dramatically faster Time to Interactive on slow networks
  • Resource Prioritisation: Critical code loads immediately whilst non-critical code defers
  • Memory Efficiency: Loading only necessary code reduces memory consumption
import dynamic from 'next/dynamic';

// Component loads only when rendered
const DynamicComponent = dynamic(() => import('../components/HeavyComponent'));

// Disable SSR for client-only components
const ClientOnly = dynamic(() => import('../components/ClientComponent'), { ssr: false });

// Show loading state whilst component loads
const WithLoading = dynamic(() => import('../components/SlowComponent'), {
  loading: () => <LoadingSpinner />
});

Tree Shaking and Dead Code Elimination

Tree shaking removes unused code from bundles. ES6 modules with static import/export syntax enable build tools to determine which exports are actually used; unused exports are "shaken" from the bundle.

Tree Shaking Best Practices

  • Named Imports: Use import { specific } from 'library' instead of import * as lib
  • Side-Effect Free: Mark packages as side-effect free in package.json
  • Library Selection: Prefer libraries built with tree shaking in mind (lodash-es over lodash, date-fns over Moment.js)
  • Avoid Barrel Files: Import directly from source files where possible
  • Production Builds: Tree shaking occurs during production builds — always test production bundles
// ❌ Poor: Imports entire library
import _ from 'lodash';
const result = _.get(object, 'path');

// ✅ Better: Imports only needed function
import get from 'lodash/get';

// ✅ Best: Modern alternative with better tree shaking
import { get } from 'lodash-es';

Bundle analysis tools like @next/bundle-analyzer visualise what's actually in your bundles. Implementing dynamic imports reduced First Load JS by 25.33% in documented case studies.

Resource Hints and Font Loading Optimisation

Resource hints inform browsers about resources the page will need, enabling proactive optimisation. By establishing connections early, prefetching likely resources, and preloading critical assets, they reduce latency and improve perceived performance.

Resource Hint Types (2025)

  • dns-prefetch: Performs DNS lookups for domains before resources are requested
  • preconnect: Establishes early connections including DNS lookup, TCP handshake, and TLS negotiation
  • preload: Fetches critical resources needed for the current page with high priority
  • prefetch: Fetches resources likely needed for future navigation with low priority
  • SEO Impact: Improve Core Web Vitals by reducing LCP (preload), INP (preconnect), and CLS (preload fonts)
<!-- DNS prefetch + preconnect + preload -->
<link rel="dns-prefetch" href="https://www.google-analytics.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="preload" href="../fonts/primary.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="../hero-image.webp" as="image">

Only preconnect to the most critical external domains (3–4 maximum) — establishing connections consumes resources. The crossorigin attribute is necessary when preconnecting to origins serving CORS resources like fonts. The as attribute on preload specifies the resource type, enabling correct prioritisation.

Font Loading Optimisation

Font Loading Best Practices (2025)

  • font-display: swap: Displays text immediately with fallback fonts, swapping when custom fonts load
  • Preload Critical Fonts: For fonts needed above the fold
  • Preconnect to Font CDNs: Establish early connections to Google Fonts
  • Subset Fonts: Include only required characters/weights to reduce file sizes
  • WOFF2 Format: Superior compression (30% smaller than WOFF)
  • Fallback Matching: Match fallback metrics to custom fonts to minimise CLS during swap
  • Self-Hosting Consideration: Eliminates external requests but requires managing updates and caching

Lighthouse Performance Scoring and SEO

Google Lighthouse is the de facto standard for measuring web performance. A common misconception persists: Google has explicitly stated that Lighthouse scores themselves don't directly influence rankings. Instead, Google uses the underlying metrics — specifically Core Web Vitals — as ranking factors.

Understanding the Lighthouse-SEO Relationship

  • Not Direct Ranking Factors: Google doesn't use Lighthouse scores (0–100) directly in ranking
  • Core Web Vitals Matter: LCP, INP, and CLS — which Lighthouse measures — are ranking factors
  • Diagnostic Value: Lighthouse provides insights into optimising metrics that affect rankings
  • Correlation, Not Causation: High scores correlate with good CWV, which correlate with better rankings
  • Mobile Priority: Mobile-first indexing emphasises mobile performance

Lighthouse Best Practices

  • Test in Incognito: Disable browser extensions that might affect results
  • Mobile Testing: Prioritise mobile simulation matching Google's mobile-first indexing
  • Multiple Runs: Average results — performance varies between runs
  • Field Data Correlation: Compare lab data with real-world Chrome UX Report data
  • Focus on Opportunities: Address specific opportunities rather than chasing score numbers
  • CI/CD Integration: Automate Lighthouse testing in deployment pipelines

Next.js 15 Performance Optimisations

Next.js 15, released in October 2025, introduces performance optimisations designed to improve Core Web Vitals. The next/image component handles automatic format selection (WebP/AVIF), responsive sizing, CLS prevention through automatic dimensions, and native lazy loading by default — with a priority prop for LCP images.

import Image from 'next/image';

// LCP image with priority loading
<Image src="../hero.jpg" alt="Hero" width={1200} height={630} priority />

// Responsive image with lazy loading
<Image src="../feature.jpg" alt="Feature" width={800} height={600}
  sizes="(max-width: 768px) 100vw, 50vw" />

React Server Components render on the server and send only HTML, eliminating their JavaScript from client bundles. Minimising Client Components (those marked 'use client') maximises performance. next/dynamic enables component-level code splitting with SSR control, and optimizePackageImports automatically optimises imports from large packages like icon libraries.

// next.config.js
module.exports = {
  experimental: {
    optimizePackageImports: ['@heroicons/react', 'lodash-es', 'date-fns']
  }
};

Performance Optimisation Implementation Checklist

  • Identify the LCP element; preload LCP images; ensure they load eagerly
  • Minimise TTFB (CDN, caching); eliminate render-blocking CSS/JS above the fold
  • Audit third-party scripts; implement code splitting to reduce initial payload
  • Add explicit dimensions to all images/videos; preload critical fonts with font-display: swap
  • Convert images to WebP/AVIF; implement srcset/sizes; lazy-load below-the-fold; aim for <150KB per image
  • Route-based + dynamic-import code splitting; tree shaking via named imports; audit with bundle analyzer
  • Preconnect to 3–4 critical domains; dns-prefetch others; WOFF2 fonts; match fallback metrics
  • Run Lighthouse in incognito + mobile; monitor field data via Chrome UX Report and Search Console; set performance budgets

✦ Key Takeaways

  • Core Web Vitals directly impact SEO — LCP < 2.5s, INP < 200ms, CLS < 0.1; only 47% of sites meet all three in 2025.
  • INP replaced FID in March 2024 — it measures responsiveness across the whole page lifecycle, not just the first interaction.
  • Modern image formats deliver substantial savings — WebP 25–35% and AVIF ~50% smaller than JPEG.
  • Lazy loading must be strategic — below-the-fold only; never lazy-load LCP elements.
  • Code splitting reduces initial bundle size — route + dynamic imports can cut First Load JS by 25%+.
  • Resource hints guide the browser — preconnect to critical origins, preload essentials, dns-prefetch the rest.
  • Lighthouse scores aren't ranking factors — Google uses the underlying Core Web Vitals; Lighthouse is a diagnostic.
  • Next.js 15 provides automatic optimisations — next/image, Server Components, and automatic splitting.
  • Performance impacts business outcomes — poor CWV cost 8–35% in revenue and rankings.
  • Field data validates lab improvements — verify real-world impact via Chrome UX Report.