Most page speed advice stops at the theory: here are the Core Web Vitals, here are the thresholds, good luck. This guide is the other half. It assumes you already know roughly what LCP, INP and CLS measure (if not, start with our Core Web Vitals guide) and focuses on the fixes that actually make pages faster: a quicker server response, proper caching, compression, fewer render-blocking files, sensible font loading, and getting third-party scripts under control. It ends with platform-specific advice for WordPress and Shopify, where most of the usual tips either do not apply or apply differently.
One idea runs through everything below: a page is slow because the browser is waiting for something. Waiting for the server to answer. Waiting for a stylesheet before it can draw anything. Waiting for a font, a hero image, or a chat widget's JavaScript to finish running. Every fix is a way to remove a wait, shorten it, or move it out of the way of what the visitor actually needs to see.
Start With the Right Measurements
Before changing anything, know which kind of data you are looking at, because the two kinds often disagree.
| Field data | Lab data | |
|---|---|---|
| Where it comes from | Real Chrome users, collected in the Chrome User Experience Report (CrUX) | A single simulated page load, usually Lighthouse |
| Where you see it | PageSpeed Insights (top section), Search Console's Core Web Vitals report, CrUX dashboards | PageSpeed Insights (lower section), Chrome DevTools, Lighthouse CI |
| Time window | Rolling 28 days | Right now |
| Used by Google for page experience | Yes | No |
| Best for | Knowing whether you have a real problem | Diagnosing why, and testing a fix before it ships |
Google's page experience signals use field data, so that is the scoreboard. Lab data is the diagnostic tool. A Lighthouse performance score of 45 on a simulated slow phone does not mean your real visitors have a bad time, and a score of 98 does not mean they have a good one. Low-traffic pages often have no field data of their own, in which case PageSpeed Insights falls back to origin-level data for the whole site.
For a quick read on any URL, run it through the page speed test, then check real-user numbers with the Core Web Vitals checker. Because field data is a 28-day rolling window, expect fixes to take up to a month to show fully in Search Console. That delay is normal and is not a sign the fix failed.
Fix in this order: server response, then render-blocking resources, then the LCP element, then JavaScript. Each step only pays off once the step before it is reasonable.
Step 1: Make the Server Answer Faster (TTFB)
Time to First Byte is how long the browser waits between asking for the page and receiving the first byte of the response. It includes DNS lookup, the connection, TLS negotiation, any redirects, and the time your server spends building the HTML. Nothing else on the page can start until it arrives, so a slow TTFB caps how fast everything else can be. web.dev suggests aiming for a TTFB of 0.8 seconds or less as a rough guide for most sites; it is not a Core Web Vital itself, but it feeds directly into LCP.
Measure it with the TTFB checker, and test a few page types separately. A static homepage might answer in 150ms while a search results page or a logged-in dashboard takes two seconds, and averages hide that.
Cache the HTML itself
The single biggest TTFB win on most content sites is not generating the page on every request. If a blog post looks the same for every visitor, build it once and serve the stored copy. This is called full-page caching, and it can happen at several layers:
- Application level: WordPress caching plugins, static site generation, or incremental regeneration in frameworks like Next.js.
- Server level: Nginx FastCGI cache, Varnish, or LiteSpeed Cache on LiteSpeed servers.
- Edge level: a CDN that stores HTML (not just images) close to the visitor.
Pages that are personalised (carts, account pages) cannot be cached whole, but they are usually a small share of the pages that rank. Cache the public pages aggressively and leave the private ones dynamic.
Fix the slow work behind uncached pages
When a page must be built per request, the usual culprits are slow database queries, calls to external APIs during rendering, and too little server capacity. Practical moves: add database indexes for the queries that run on every page load, cache the results of expensive queries in memory (Redis or Memcached), move external API calls out of the request path where possible, and upgrade from the cheapest shared hosting plan if the server is simply overloaded. On shared hosting, your site competes with many others for the same CPU, and no plugin can fix that.
Remove redirect hops
Each redirect before the final page adds a full round trip. A visitor who types example.com and goes through http://example.com to https://example.com to https://www.example.com/ pays for three requests before the real one starts. Collapse them to one hop, and make sure internal links, ads and email campaigns point to the final URL. Our redirects guide covers how, and the redirect chain checker shows every hop.
Step 2: Put a CDN in Front
A content delivery network keeps copies of your files on servers around the world, so a visitor in Sydney does not have to wait for a round trip to a server in Virginia. Distance matters more than people expect: every connection setup involves several round trips, and each one is limited by the speed of light through fibre.
A CDN helps in three ways. It shortens the distance for cached files. It usually terminates TLS close to the visitor, which speeds up connection setup even for uncached requests. And most modern CDNs support HTTP/2 and HTTP/3 out of the box, plus Brotli compression, without any work on your server. Check whether your site is already behind one with the CDN detector; many hosts include a CDN that is switched off by default.
The common mistake is putting a CDN in front of the site but caching only images, CSS and JavaScript, while every HTML request still travels to the origin. If your pages are cacheable, configure the CDN to cache HTML too, with a sensible purge on publish.
Step 3: Compress Everything Text-Based
HTML, CSS, JavaScript, JSON and SVG are text, and text compresses extremely well. Every server and CDN should send them compressed with Brotli (preferred, supported by all modern browsers) or gzip as a fallback. Check the response headers: you want to see content-encoding: br or content-encoding: gzip on text responses. The HTTP header checker shows them for any URL.
A minimal Nginx setup for gzip (Brotli needs an extra module on Nginx, which many hosts and CDNs already provide):
gzip on;
gzip_comp_level 5;
gzip_min_length 256;
gzip_types text/css application/javascript application/json image/svg+xml text/plain application/xml;
Do not bother compressing JPEG, PNG, WebP, AVIF, WOFF2 or video files. They are already compressed, and running them through gzip wastes CPU for no gain.
Step 4: Cache Static Files Properly in the Browser
Repeat visitors and visitors who browse several pages should not download your stylesheet and logo again on every page. The Cache-Control header tells the browser how long it may reuse a file.
The best pattern is to give static files a fingerprint in their name, such as app.3f9a1c.js, so that the name changes whenever the content changes. Then you can tell the browser to keep them for a year:
# Fingerprinted assets: cache for a year, never revalidate
Cache-Control: public, max-age=31536000, immutable
# HTML: always check with the server (or the CDN) for a fresh copy
Cache-Control: no-cache
no-cache does not mean "do not cache"; it means "check before reusing". With an ETag or Last-Modified header, that check is a tiny request that usually returns 304 Not Modified. Most build tools (Vite, webpack, Next.js) fingerprint files automatically. On older sites that use plain names like style.css, a shorter max-age such as a week is safer, because there is no way to force browsers to fetch a changed file early.
Paste a page into the Cache-Control analyzer to see which files have no caching headers or overly short lifetimes. It is common to find that the theme's CSS is cached for a year while the 400KB of images are not cached at all.
Step 5: Get Render-Blocking Files Out of the Way
When a browser finds a normal stylesheet or a normal <script> tag in the <head>, it stops painting until that file has downloaded (and, for scripts, run). This is called render-blocking, and it is the most common reason a page with a fast server still shows a blank screen for a second or two.
JavaScript: defer or async
<!-- Blocks rendering: avoid in the head -->
<script src="/js/app.js"></script>
<!-- Downloads in parallel, runs after the HTML is parsed, in order -->
<script src="/js/app.js" defer></script>
<!-- Downloads in parallel, runs as soon as it arrives, in any order -->
<script src="/js/analytics.js" async></script>
Use defer for your own scripts that depend on each other or on the page structure. Use async for independent scripts such as analytics. Scripts with type="module" are deferred by default.
CSS: smaller, then inlined where it counts
CSS has to block rendering, otherwise the page would flash unstyled. What you can control is how much of it there is. Start by removing unused CSS: many themes ship styles for every possible component on every page. Chrome DevTools' Coverage panel shows how much of each file was actually used on a given page. The next step, for sites where it is worth the effort, is critical CSS: inline the small set of rules needed to draw the top of the page directly in the HTML, and load the full stylesheet without blocking. Many WordPress optimisation plugins and some build tools can generate critical CSS automatically. Check the result visually, because a wrong critical set causes a visible flash of restyled content and can hurt CLS.
Check what is visible first
Everything a visitor sees before scrolling should be able to render without waiting for anything that sits below it.
Step 6: Load Fonts Without Blocking Text
Custom web fonts are a frequent and underrated source of slowness. By default, some browsers hide text for up to three seconds while a font downloads, which leaves visitors staring at a blank space where the headline should be. The fixes are cheap:
- Use
font-display: swap(oroptional) in your@font-facerules, so text shows immediately in a fallback font.optionalavoids layout shift by only using the web font if it arrives very quickly;swapalways uses it but may shift text when it loads. - Use WOFF2 only. Every modern browser supports it and it is the smallest format. You no longer need TTF, EOT or SVG fonts.
- Self-host. Loading fonts from a third-party host adds a DNS lookup and a new connection. Since browsers partitioned their caches by site, the old argument that visitors already have Google Fonts cached no longer holds.
- Subset and limit weights. A font file with every language's characters and nine weights is huge. Keep only the character sets and weights you actually use. A variable font can replace several static weight files.
- Preload the one or two fonts used above the fold.
<link rel="preload" href="/fonts/inter-var-latin.woff2" as="font" type="font/woff2" crossorigin>
<style>
@font-face {
font-family: "Inter";
src: url("/fonts/inter-var-latin.woff2") format("woff2");
font-weight: 100 900;
font-display: swap;
}
</style>
The crossorigin attribute is required on font preloads even for same-origin files; without it the browser downloads the font twice. To reduce the shift when the real font replaces the fallback, CSS descriptors such as size-adjust and ascent-override let you tune the fallback to match. The font loading analyzer lists every font a page loads, its format and its font-display setting.
Step 7: Make the Largest Element Arrive Early
On most pages, the LCP element is a hero image or a large heading. If it is an image, the browser should start downloading it as early as possible and at full priority:
<img src="/images/hero-1200.avif" width="1200" height="600"
alt="Trail runner crossing a ridge at sunrise"
fetchpriority="high">
Two common mistakes undo this. One is lazy-loading the hero image: loading="lazy" on an image that is visible on load delays it. The other is setting the hero as a CSS background image or injecting it with JavaScript, so the browser cannot discover it until late. Lazy-load images further down the page, never the first one. The lazy-loading checker flags both cases.
Image formats, responsive srcset, sizing and compression are a big topic in their own right; our image SEO guide covers them in depth. The short version: serve AVIF or WebP, size images for the space they actually occupy, and always set width and height so the layout does not shift.
Step 8: Tame Third-Party Scripts
On many business sites, the code the team wrote is not the problem. The problem is everything added through a tag manager over the years: analytics, two old ad pixels, a heatmap tool nobody checks, a chat widget, a cookie banner, a reviews widget, an A/B testing script. Third-party scripts compete for the main thread, which hurts INP, and some inject content that shifts the layout.
A practical cleanup process:
- List everything. Open the Network panel in DevTools, filter by third-party domains, and write down every tool and who owns it. Your tag manager's container is a good second source.
- Remove what nobody uses. Old pixels for campaigns that ended years ago are extremely common. Every tag needs an owner who can say why it is there.
- Delay what is not needed immediately. Chat widgets, social embeds and video players do not need to load before the visitor interacts.
- Use facades for heavy embeds. A facade is a lightweight placeholder, such as a static thumbnail with a play button, that loads the real YouTube player or chat widget only when clicked. The difference in JavaScript can be hundreds of kilobytes.
- Load the rest with
asyncordefer, and reserve space for anything that injects visible content, so it does not cause layout shifts.
The page speed test flags heavy third-party code among the things slowing a page down, so you can see how much comes from other companies' servers.
Step 9: Warm Up Connections and Next Pages
A few newer browser features can shave time off once the basics are done:
preconnecttells the browser to open a connection to another origin early, for example the CDN that serves your images. Use it for one to three critical origins at most; each one costs something.- 103 Early Hints is a status code a server or CDN can send while it is still building the page, listing resources to preload or preconnect to. Chrome supports it, and CDNs such as Cloudflare can generate Early Hints from your
Linkheaders. It mainly helps pages with a slow, uncacheable TTFB. - The Speculation Rules API lets Chromium-based browsers prefetch or prerender pages the visitor is likely to open next, making the next navigation feel instant. Use it carefully: prerendering runs the page, which can fire analytics events and use visitors' data. Start with prefetch on clear patterns (for example, links that are hovered), exclude logout, cart and other state-changing URLs, and check that your analytics tool handles prerendered pages correctly.
<script type="speculationrules">
{
"prefetch": [{
"where": { "and": [
{ "href_matches": "/*" },
{ "not": { "href_matches": "/cart*" } },
{ "not": { "href_matches": "/logout" } }
]},
"eagerness": "moderate"
}]
}
</script>
Make sure the server supports HTTP/2 or HTTP/3 as well. Both let the browser download many files over one connection, which removes the old reason for bundling everything into one giant file or splitting assets across several domains. If you inherited a site that uses "domain sharding" (images on img1., img2. and so on), that practice now slows things down.
WordPress: What Actually Moves the Needle
WordPress builds every page with PHP and database queries, so without caching it is slow by default. The good news is that a well-configured WordPress site can be very fast. In rough order of impact:
- Hosting. A WordPress site on overloaded shared hosting will have a slow TTFB no matter which plugins you install. Managed WordPress hosts usually include server-level page caching and a CDN.
- One caching plugin, configured properly. Popular options include WP Rocket, LiteSpeed Cache (best on LiteSpeed servers), W3 Total Cache and WP Super Cache, and many hosts provide their own. Install one, not two. Two caching plugins fighting each other is a classic cause of broken pages and stale content.
- Plugin audit. Every active plugin can add PHP work, database queries, CSS and JavaScript to every page, including pages where it is not used. Deactivate plugins one at a time on a staging copy to find the expensive ones. Sliders, page builders, social share plugins and "all-in-one" plugins are frequent offenders.
- Theme weight. Heavy multipurpose themes and page builders output large amounts of CSS and nested markup. A lighter theme often beats any amount of optimisation applied on top.
- Images. WordPress generates responsive image sizes and adds
srcsetand lazy loading automatically, and recent versions addfetchpriority="high"to the image they detect as likely LCP. Add an image optimisation plugin or CDN to serve WebP or AVIF. - Database housekeeping. Large
autoloadoptions left behind by removed plugins slow every request. Cleaning them up is a job for someone comfortable with the database, with a backup first.
Be careful with "optimise everything" toggles in caching plugins. Combining or delaying JavaScript can break menus, forms and checkouts. Turn features on one at a time and test the pages that matter.
Shopify: Working Within the Platform
On Shopify you do not control the server, the cache headers or the CDN. Shopify serves stores through its own global CDN, handles compression and HTTP/2 and HTTP/3, and resizes and converts images on the fly. That removes several items from this guide entirely. What is left is mostly about the theme and the apps:
- Apps are the main cost. Many apps inject scripts into every page of the storefront, and some keep injecting them after being uninstalled, because code was added to the theme files. After removing an app, check the theme code for leftover snippets. Prefer apps that use theme app extensions (app blocks and app embeds), which Shopify introduced partly so app code can be added and removed cleanly.
- Theme choice. Shopify's own Online Store 2.0 themes, such as Dawn, are built with performance in mind. Heavily customised or older themes often load large JavaScript libraries on every page.
- Use Shopify's image tools. Liquid's
image_urlandimage_tagfilters generate correctly sized images andsrcset. Do not lazy-load the main product image or the first slide of a homepage banner. - Limit homepage sections. Sliders with many large slides, autoplay videos and multiple product carousels add up quickly.
- Look at the right report. Shopify's admin shows a web performance report based on real-user Core Web Vitals. Use it alongside PageSpeed Insights, and test product and collection pages, not only the homepage.
Speed matters even more for stores, where every page type has a different template. Our ecommerce SEO guide covers the wider picture for product and category pages.
Other Platforms and Frameworks
For sites built with JavaScript frameworks, the biggest wins usually come from rendering on the server or at build time instead of in the browser, and from shipping less JavaScript to the client. Client-side rendering means the visitor waits for the HTML, then the JavaScript, then the data, then the render. Our JavaScript SEO guide explains the rendering options and their effect on crawling as well as speed. For page builders such as Wix and Squarespace, much of the infrastructure is out of your hands; focus on image sizes, the number of apps and embeds, and keeping pages reasonably short.
Why Speed Matters for Search, Honestly
Google confirmed page experience, including Core Web Vitals, as a ranking signal, but it has also been clear that relevance comes first: a fast page with weaker content does not outrank a much better slow page. Speed tends to matter as a tie-breaker between similarly relevant results, and much more directly for the people who arrive. Slow pages lose visitors before they ever load. There is also a crawling angle on very large sites: a faster server lets Googlebot fetch more pages in the same time, which our crawl budget guide explains. And AI crawlers fetching pages for live answers work on tight time budgets, so a slow server is a small but real disadvantage there too.
A Repeatable Speed Workflow
- Check field data for your key templates (homepage, category, product or article, landing pages) in Search Console's Core Web Vitals report. Our Search Console guide explains how to read it.
- Pick the worst template with the most traffic and run it through a lab test to see what blocks rendering.
- Fix in order: TTFB and caching, render-blocking resources, the LCP element, then third-party and first-party JavaScript.
- Deploy, confirm the improvement in a lab test, then wait for the 28-day field window to catch up.
- Add speed checks to your regular audit so regressions are caught. A full site audit includes performance checks across many pages, and the SEO checklist keeps them on the list.
Frequently Asked Questions
What is a good page load time?
There is no single official number for "load time". Google's thresholds are per metric: LCP within 2.5 seconds, INP under 200 milliseconds and CLS under 0.1, each measured at the 75th percentile of real visits. For server response, web.dev treats a TTFB of 0.8 seconds or less as good as a rough guide.
Why is my Lighthouse score low when Search Console says my pages are good?
Lighthouse simulates one load on a throttled mid-range phone and slow network. Search Console reports what real Chrome users experienced over 28 days. If your visitors mostly use fast devices and connections, field data can look much better than the lab. For page experience, Google uses field data.
Do I need a CDN if my visitors are all in one country?
Distance matters less in that case, but a CDN still helps through faster TLS connections, HTTP/3, compression and offloading traffic from your server. If your host includes one, turn it on. If your server is in the same region as your visitors and caches pages well, it is less urgent.
Will a caching plugin fix a slow WordPress site?
It usually fixes TTFB for logged-out visitors, which is the biggest single win. It will not fix a heavy theme, dozens of plugin scripts, oversized images or slow third-party widgets. Those need separate work.
Should I remove Google Tag Manager to speed up my site?
The container itself is rarely the problem. What it loads is. Audit the tags inside it, remove unused ones, and set non-essential tags to fire later. A tidy container is usually fine.
Does page speed affect AI search visibility?
No AI provider has published speed as a selection factor. Practically, AI crawlers and live fetchers that time out or get errors cannot use your page, so a fast, reliable server removes one obstacle. Content and accessibility to crawlers matter far more; see our AEO guide.
How long until speed fixes show in Search Console?
The Core Web Vitals report uses a 28-day rolling window of field data, so a fix rolls in gradually over about four weeks. You can use the "Validate fix" button on an issue to track Google's re-check.