Web DevelopmentWordPress vs Drupal: Which CMS Is Right for Your Business?WordPress vs Drupal compared on ease of use, content modeling, security, performance, ecommerce and cost drivers, with five questions to help you choose.How to Optimize a Website for Fast Page Loads
A step by step guide to faster pages: measure Core Web Vitals, then fix server response, images, render blocking code, scripts and caching in order.

To make a website load fast, measure it first, then fix the biggest problems in order: a slow server response, oversized images, render blocking CSS and JavaScript, too many third party scripts, and missing caching. Google's Core Web Vitals give you clear targets, so you know when a page is fast enough. Most sites see the largest gains from images, caching and cutting scripts, not from exotic tuning.
This guide walks through a practical optimization process, the specific fixes in priority order, and why the effort pays off in rankings, conversions and running costs.
Start by measuring the right numbers
Speed work without measurement is guesswork. Before changing anything, record a baseline for your most important pages: the home page, top landing pages, product or service pages, and checkout or contact forms.
The Core Web Vitals targets
Google defines three Core Web Vitals. According to web.dev's Core Web Vitals guide (checked in 2026), a page delivers a good experience when it meets these thresholds at the 75th percentile of real visits:
| Metric | What it measures | Good threshold | Usual culprits |
|---|---|---|---|
| Largest Contentful Paint (LCP) | How fast the main content appears | 2.5 seconds or less | Slow server, heavy hero image, render blocking files |
| Interaction to Next Paint (INP) | How quickly the page responds to taps and clicks | 200 milliseconds or less | Heavy JavaScript, long tasks, third party scripts |
| Cumulative Layout Shift (CLS) | How much the layout jumps while loading | 0.1 or less | Images without dimensions, late ads, injected banners |
Lab data and field data
Tools like PageSpeed Insights show two kinds of results. Field data comes from real Chrome users over recent weeks and is what Google uses. Lab data is a single simulated test, which is useful for debugging because you can rerun it after each change. Other tools such as WebPageTest and the performance panel in your browser's developer tools show a waterfall of every file the page loads, which is the fastest way to see what is slow.
Test on mobile settings first. Most visitors browse on phones over mixed connections, and a page that feels instant on office wifi can be sluggish on a phone in an elevator.

The optimization steps, in priority order
1. Fix server response time
Every other metric waits on the server's first response. If Time to First Byte is slow, nothing else can be fast.
- Use hosting sized for your traffic, with servers or a CDN close to your audience.
- Cache full pages at the server or CDN so most visitors never trigger a database query.
- Keep the platform, PHP or Node version and database current, and remove plugins or modules you do not use.
- Find slow database queries and add indexes or caching where they repeat.
2. Optimize images
Images are usually the heaviest files on a page and the most common cause of a slow LCP.
- Export images at the size they are displayed, not straight from the camera.
- Use modern formats such as WebP or AVIF, with JPEG or PNG fallbacks only where needed.
- Serve responsive images with srcset so phones download smaller files.
- Always set width and height attributes so the browser reserves space and the layout does not shift.
- Do not lazy load the main hero image; load it with high priority instead.
3. Reduce render blocking CSS and JavaScript
The browser cannot paint a page until it has the CSS it needs, and synchronous scripts in the head stop it in its tracks.
- Inline the small amount of CSS needed for the first screen and load the rest without blocking.
- Add defer or async to scripts that do not need to run before the page appears.
- Minify CSS, JavaScript and HTML, and remove code that no page uses.
- With modern HTTP/2 and HTTP/3 hosting, combining every file into one bundle matters less than it used to. Focus on sending less code overall.
4. Cut and control third party scripts
Chat widgets, tag managers, heatmaps, social embeds and ad scripts are the usual reason a page responds slowly to taps. Audit every script, remove the ones nobody uses, and load the rest after the page is interactive or only on the pages that need them.
5. Turn on caching and compression
- Browser caching: set long cache lifetimes for versioned files such as images, fonts, CSS and JavaScript so returning visitors reuse them.
- CDN caching: serve static files, and ideally whole pages, from edge servers near each visitor.
- Compression: enable Brotli or GZIP for text files such as HTML, CSS and JavaScript. Most modern servers and CDNs support both through a setting.
6. Remove unnecessary redirects
Each redirect adds another round trip before the page starts loading. Link directly to final URLs, fix chains where one redirect points to another, and keep only the redirects you need for SEO after a migration.
7. Lazy load what sits below the fold
Images, videos and embeds further down the page can wait until the visitor scrolls. Native lazy loading with the loading="lazy" attribute is supported by modern browsers; MDN's lazy loading guide explains the options. For video, show a lightweight poster image and load the player on click.
8. Load fonts carefully
Web fonts can delay text from appearing or cause it to jump. Limit the number of families and weights, host them yourself where licensing allows, preload the one or two used above the fold, and use font-display: swap so text shows immediately.
9. Reserve space for everything that loads late
Layout shift comes from content arriving after the page has painted. Give images, ads, embeds and cookie banners fixed dimensions or reserved containers so the content below them stays put.
10. Monitor and keep testing
Speed decays. New plugins, tracking tags and marketing images slowly add weight. Recheck key pages monthly and after every major release, watch the Core Web Vitals report in Search Console, and treat a regression as a bug.

Why faster pages pay off
Better experience and lower bounce
Visitors judge a site in the first moments. When pages appear quickly and respond instantly, people read more, click deeper and leave less often. Slow pages lose visitors before they see your offer.
Search visibility
Google's guidance on page experience says Core Web Vitals are used by its ranking systems, alongside content relevance, which still matters most. A fast page will not outrank a better answer, but between similar pages, speed and stability help.
More conversions
Every extra second on a product page, form or checkout is a chance for the visitor to give up. Faster pages remove friction at exactly the moments that earn revenue.
Better paid campaign results
If you run ads, landing page experience affects how platforms judge your ads, and every visitor who leaves before the page loads is a click you paid for with nothing to show.
Lower hosting and bandwidth use
Smaller pages and good caching mean fewer bytes served and less server work per visit, which helps when traffic spikes.
Stronger brand perception
A quick, stable site feels professional. A slow one makes visitors wonder whether the business behind it is just as slow to respond.
Where to begin
Pick your five most valuable pages, record their Core Web Vitals, and work through the steps above in order, retesting after each change. That approach shows which fixes made a real difference and keeps you from spending days on changes that barely move the numbers.
If you would like a second pair of eyes, Codeeo's speed optimization quick start pinpoints what is slowing your key pages, and our Core Web Vitals service fixes the issues at the code and hosting level. For sites that need a rebuild rather than a tune up, see our web development work, or start with a website audit.
Frequently asked questions
PageSpeed Insights is the best starting point because it shows both real user data from Chrome and a lab test with specific suggestions.
WebPageTest gives detailed waterfalls and lets you test from different locations and devices. Your browser's developer tools show every request in real time, and the Core Web Vitals report in Google Search Console tracks how groups of pages perform over time.
Tell us what the business needs. We will tell you what to build first.
Schedule a free consultation and get a written recommendation, with costs, before you commit to anything.
Get in touchPROVEN RESULTS

