A fast website keeps visitors, converts better and supports search rankings. Speed problems usually come from a handful of causes: slow servers, oversized images, render-blocking resources, too much JavaScript and heavy third-party scripts. This guide covers the techniques that fix each, roughly in the order a page loads. For what the metrics mean, see Core Web Vitals explained; for a business-level view of priorities, see how to optimise site speed for SEO.
Measure first
- Field data: Search Console's Core Web Vitals report and the top of PageSpeed Insights show what real users experience.
- Lab data: Lighthouse and the Chrome DevTools Performance panel show what is happening and why.
- WebPageTest: detailed waterfalls from different locations and connection speeds.
Test the templates that matter most (home, service, product, category, article) on a mid-range phone profile.
1. Server response time (TTFB)
- Use full-page caching so most requests are served from cache instead of rebuilding pages from the database.
- Use a CDN to serve cached pages and assets from locations near visitors. For Canadian audiences, choose a CDN with points of presence in Canada.
- Upgrade hosting if the server is consistently slow under load.
- Optimise database queries and reduce plugins or modules that run on every request.
- Use HTTP/2 or HTTP/3 and modern TLS.
- Avoid redirect chains on entry pages.
2. Images
- Serve WebP or AVIF with fallbacks where needed.
- Generate responsive sizes with
srcsetandsizes. - Compress to sensible quality levels.
- Set width and height to avoid layout shift.
- Lazy-load below-the-fold images with
loading="lazy", but never the LCP image. - Give the LCP image
fetchpriority="high"and make sure it is in the initial HTML, not injected by JavaScript or set as a CSS background.
3. Fonts
- Limit the number of families and weights.
- Self-host fonts and serve WOFF2.
- Use
font-display: swaporoptionalto avoid invisible text. - Preload the one or two fonts used above the fold.
- Subset fonts to the character sets you need, keeping accented characters for French content.
- Use size-adjusted fallback fonts to reduce layout shift when web fonts load.
4. CSS
- Inline critical CSS for above-the-fold content and load the rest without blocking rendering.
- Remove unused CSS, which is common with large themes and frameworks.
- Minify and compress (Brotli or gzip).
- Avoid
@importchains.
5. JavaScript
JavaScript is the main cause of poor Interaction to Next Paint and often of slow LCP.
- Ship less: remove unused libraries, replace heavy dependencies with lighter ones or native browser features.
- Split code by route so each page loads only what it needs.
- Use
deferfor scripts that are not needed immediately. - Break up long tasks (over 50 ms) so the browser can respond to input between them.
- For frameworks, use server-side rendering or static generation, and consider partial or progressive hydration. See SEO for progressive web apps.
- Debounce expensive event handlers and avoid re-rendering large parts of the page on each interaction.
6. Third-party scripts
Chat widgets, analytics, tag managers, A/B testing tools, social embeds and ad scripts often account for much of a page's JavaScript.
- Audit every third-party script and remove those no longer used.
- Load non-essential widgets after the page is interactive or on user interaction.
- Use lightweight facades for video embeds and chat widgets that load the full script only when clicked.
- Keep tag manager containers lean and review them regularly.
7. Caching and delivery
- Set long cache lifetimes for versioned static assets (with file hashes in names).
- Use compression for text assets.
- Preconnect to critical third-party origins you cannot avoid.
- Consider the bfcache (back/forward cache): avoid patterns that prevent it, such as
unloadevent handlers, so back navigation is instant.
8. Layout stability
- Reserve space for images, ads, embeds and dynamic content.
- Avoid inserting banners above existing content after load; overlay them instead.
- Animate with
transformandopacityrather than properties that trigger layout.
9. Platform-specific quick wins
- WordPress: quality hosting, a caching plugin, image optimisation, fewer plugins, a lightweight theme. See WordPress website design guide.
- Shopify: remove unused apps and leftover app code, compress theme images, limit sections on the homepage.
- JavaScript frameworks: server rendering, route-based code splitting, image components with built-in optimisation.
10. Keep it fast
Speed degrades over time as features, plugins and scripts accumulate. Set a performance budget (for example, maximum JavaScript size per page), check Core Web Vitals monthly and test before adding new third-party tools.
Prioritising the work
Start with changes that affect every page and need little development: caching, a CDN, image compression and removing unused third-party scripts. Then tackle template-level work on your highest-traffic pages, such as the LCP image, critical CSS and font loading. Leave deep JavaScript refactoring until the simpler wins are done and you know exactly which interactions are slow.
Frequently asked questions
Which technique gives the biggest improvement?
It depends on the site, but caching with a CDN, image optimisation and removing unnecessary third-party scripts usually deliver the largest gains.
Should I aim for a perfect Lighthouse score?
No. Aim to pass Core Web Vitals in field data on mobile and desktop.
Do speed plugins solve everything?
They help with caching, minification and images, but cannot fix heavy themes, slow hosting or excessive scripts.
Need a faster site?
Performance work is part of our technical SEO service. Start with a free SEO audit.