How to Optimize Website Performance
Stop chasing perfect Lighthouse scores and start with the biggest bottleneck on your real user pages — usually images or third-party scripts.
Start here
- Run PageSpeed Insights on your three most visited pages and note LCP, INP, and CLS before changing anything.
- Compress every image and serve them at display size using responsive srcset attributes to save bandwidth.
- Defer non-critical JavaScript and audit third-party scripts that block the initial render.
- Enable browser caching and route static assets through a CDN to cut latency for repeat visitors.
- Check server Time to First Byte — a slow backend undermines every front-end optimisation you make.
Plain-English take
Website performance optimisation means cutting the time between a user clicking a link and seeing useful content. I start by measuring, then I shrink files, deliver them smarter, and remove blockers.
First, shrink images. Most pages carry images far bigger than their display size -- I once saw a 4000px-wide product photo served inside a 300px box. Compress with tools like Squoosh, serve WebP or AVIF where supported, and use srcset attributes so phones don't download desktop-sized files. Next, minify CSS and JavaScript. A bloated stylesheet adds milliseconds to the critical path. Remove unused code: Chrome DevTools coverage tab shows you what never runs.
Then make delivery smarter. A [CDN](/performance-optimization/) serves your files from a server near the visitor. Combined with browser caching headers, repeat visits load in under a second for cached assets. I also defer JavaScript that isn't needed for above-the-fold content. Third-party scripts -- analytics, chat widgets, font loaders -- are the worst offenders. Load them after the main content renders.
Finally, address the server. If your Time to First Byte (TTFB) is above 600ms, no front-end trick will make the page feel fast. Upgrade hosting, optimise database queries, or add a page cache. The order matters: fix the biggest bottleneck first, not the easiest one.
When it actually matters
Performance work is not always urgent, but it becomes critical in several scenarios.
Your bounce rate is high on mobile. 53% of mobile users abandon a page if it takes longer than three seconds to load. If your analytics show a sharp drop-off before your content finishes rendering, that's a performance signal. I run a [Core Web Vitals](/core-web-vitals/) check on the pages with the highest exit rates.
Search Console flags Core Web Vitals. If LCP exceeds 2.5 seconds or CLS is above 0.1, Google may deprioritise those pages in search results. I've seen rankings recover after fixing a single oversized hero image that caused poor LCP.
You are adding heavy features. A new image slider, a third-party booking widget, or an embedded video can add seconds to load time without you noticing during development. Always measure before and after.
You are rebuilding or migrating the site. That's your best chance to bake in performance from the start: optimised images, clean code, proper caching, and a [Technical SEO](/technical-seo/) audit to catch hidden slowdowns like unnecessary redirects or excessive DOM size.
You are running paid campaigns. Landing page speed directly affects Quality Score and conversion rates. Even a half-second improvement can lift conversion by 5-10% according to several industry studies.
When none of these conditions apply, standard maintenance every quarter is usually enough. Don't optimise for the sake of it — measure, then act.
What I got wrong
I used to upload full-resolution images and let CSS resize them. That was a huge waste: the browser still downloaded a 5MB file even though the displayed image was 400px wide. Now I always serve images at their intended display size and compress them first.
I thought optimising the homepage was enough. But users land on product pages, blog posts, and category pages — each loads different assets. I now run performance tests on my top 10 entry pages by traffic.
I chased every lab score. I spent days shaving 10ms off a Lighthouse metric while ignoring a 1.2-second server response time. Real user data — CrUX — told a different story. I should have started with the field data.
I believed caching solved everything. Enabling browser caching is easy, but if your CSS and JavaScript are still render-blocking, caching alone won't make the first load fast. You need to inline critical CSS and defer the rest.
I ignored server-side performance because I'm a front-end SEO. But slow database queries or a cheap shared host tank TTFB regardless of how lean your front-end code is. These days I do a basic server check as part of any [SEO audit](/seo-audit/).
I also underestimated the cost of third-party scripts. One analytics script from a major vendor can add 300ms to LCP. I now audit all third-party code quarterly and replace heavy ones with lightweight alternatives or load them via a tag manager that defers execution.
Next step
Quick answers
Why is mobile performance more important than desktop?
Mobile users face slower network conditions and smaller screens. Google uses mobile-first indexing, so the mobile version of your site determines rankings. A slow mobile experience hurts both user retention and search visibility more sharply than desktop.
Should I sacrifice image quality for speed?
No. Modern formats like WebP and AVIF deliver comparable quality at 25–35% smaller file sizes. Compress responsibly using tools that preserve visual fidelity. Your visitors won't notice the difference, but your page load time will.
How often should I run a performance audit?
I run a quick Core Web Vitals check monthly using Search Console, plus a full PageSpeed Insights test after any major deployment. For high-traffic sites, set up continuous monitoring with a tool like DebugBear to catch regressions early.
What is the single most impactful performance fix?
Optimising images is usually the biggest win for the least effort. Run your site through PageSpeed Insights and see if image-related recommendations dominate the list. If so, compressing and resizing them can cut page weight by 50% or more.
Sources
Primary documentation is linked directly. Anything commercial is marked nofollow.
- Google Search Central — Official guidance on Core Web Vitals and page experience signals for SEO.
- web.dev — Practical, up-to-date recommendations for image optimisation, JavaScript deferral, and caching.
- PageSpeed Insights — Measures lab and field performance signals, used to baseline and prioritise fixes.
- Cloudflare Learning Center — Explains CDN delivery, browser caching, and network-level performance in plain language.
Notes from Callum Bennett.