NewsInsightsDevelopment

Website Performance Optimization: How to Build Faster Sites From Wireframe to Launch

Illustration of website performance: a browser with a speed gauge, a stopwatch and a wireframe connected to it

Speed gets decided early, usually long before anyone writes code. Website performance optimization is the process of making web pages load, respond and settle quickly for real visitors. It covers everything from what goes on a page in the first place to how images, fonts, code, servers and third-party scripts are handled. Done well, it improves user experience, conversion rates and how a site performs in search.

Performance matters on every website, and a developer can’t bolt it on at the end. It has to be part of the plan from the wireframe stage on, with designers and developers working together to understand how design and architecture decisions affect speed. This guide covers how to measure performance with Google’s Core Web Vitals, where slowdowns come from and how to fix them at every stage of a project.

Why does website performance matter?

When we first published this post in 2015, studies showed that nearly half of all web users would abandon a site if it hadn’t loaded within 3 seconds, and that even small speed improvements could noticeably lift conversion rates. Devices and networks have improved since then, but pages have grown heavier and expectations have only risen, so the principle still holds. Slow pages lose people.

Speed also matters for search. Google uses Core Web Vitals as part of its page experience signals and recommends that site owners achieve good Core Web Vitals for success in Search. Content relevance still comes first, but a fast, stable page helps both people and the crawlers that index your site, a theme we explore in don’t build your site for humans; build it for bots?

What are Core Web Vitals?

Core Web Vitals are three metrics Google uses to measure real-world user experience. To pass, a page should meet the “good” threshold for all three at the 75th percentile of page loads, on both mobile and desktop.

  • Largest Contentful Paint (LCP) measures loading: how long it takes for the largest visible element, often a hero image or headline, to appear. Good is 2.5 seconds or less.
  • Interaction to Next Paint (INP) measures responsiveness: how quickly the page visibly reacts after someone clicks, taps or types. Good is 200 milliseconds or less. INP replaced First Input Delay (FID) as a Core Web Vital in March 2024.
  • Cumulative Layout Shift (CLS) measures visual stability: how much content jumps around while the page loads. Good is 0.1 or less.

Each metric maps to a familiar frustration. LCP is the blank screen, INP is the button that seems to ignore you, and CLS is the article that jumps just as you go to click something.

How do you measure website performance?

There are two kinds of performance data, and you need both:

  • Field data comes from real visitors on real devices and networks. Google collects it in the Chrome User Experience Report (CrUX), and it’s what Core Web Vitals assessments are based on. You’ll see it at the top of a PageSpeed Insights report and in the Core Web Vitals report in Google Search Console.
  • Lab data comes from a simulated test under fixed conditions. Lighthouse, built into Chrome DevTools and used by PageSpeed Insights, produces a performance score and a list of specific fixes. Lab data is ideal for debugging and for testing changes before launch.

A Lighthouse score of 100 is nice, but it isn’t the goal. What matters is whether your real visitors, especially on mid-range phones and mobile networks, get a fast experience on the pages that drive your business.

Why performance starts at the wireframe

It might be surprising, but you can avoid a lot of performance problems at the wireframing stage. Performance is the whole team’s problem, not only the developer’s.

Every time you add something, anything, to a web page, you slow it down, and some things slow it down much more than others. Text? Don’t worry about it. Ads and embedded social feeds (in 2015, the usual suspects were Flickr and Twitter feeds) are external resource calls, and they’re often the biggest offenders. What about “possibly related posts,” tag clouds, comments, category lists and recent posts? Your server may have to query the database for each one, and every query adds time. Caching solves some of these problems, something FUEL CMS does by default; WordPress can do it too with a caching plugin such as WP Super Cache, which grew out of the original WP-Cache plugin.

No single one of these elements is usually terrible on its own, but when you cram a page full of ads and social feeds, loading grinds to a halt. Have you ever started reading an article, or tried to click something right after the content loaded, only to have the whole page start jumping around? Those are external resources loading asynchronously. After the initial content is “painted” to the screen, feeds and ads load in, often with little thought for how they’ll affect content that’s already there. Today that jumping has a name and a score, Cumulative Layout Shift, and reserving space for late-loading elements in the layout is one of the simplest ways to fix it.

So what does this have to do with wireframing? This is the phase where you cut the cruft and decide what’s really important. The developer can work out the best way to build what you include, but consider cutting that barely used feed or widget before it ever reaches a design file.

How does visual design affect page speed?

From a visual design standpoint, many things affect page weight and performance, including web fonts, images and animations. Nobody is going to dictate “no images” or “no web fonts.” Instead, it’s a delicate balancing act. If there’s one huge hero image at the top of the page, can we ditch all those thumbnails? Let’s use web fonts, but keep them lean (in 2015 our rule of thumb was under 100KB).

Many teams set a performance budget, and one part of that budget can be page weight, a cap on the total size of the page. That includes everything, from the HTML and CSS to that big juicy product shot. Budgets can also target metrics like LCP. So if you absolutely need every font weight, thin and regular and semibold and extra bold, you probably have to give up some photography. It’s all give and take.

Image optimization

Images are usually the heaviest part of a page and often the LCP element. The biggest wins:

  • Use modern formats such as WebP or AVIF and compress every image.
  • Serve responsive sizes with srcset so phones don’t download desktop-sized files.
  • Lazy-load images below the fold, but never the hero image; load that one with high priority.
  • Always set width and height (or an aspect ratio) so the layout doesn’t shift as images arrive.
  • Use SVG for logos, icons and illustrations. Our post on SVG vectors on the web explains why they stay sharp at a fraction of the weight.

Choosing images that scale well across screen sizes also starts before development. See our considerations when selecting imagery for your site.

Web fonts

Limit the number of families and weights, use the compressed WOFF2 format, subset fonts to the characters you need, and preload the one or two files used above the fold. Setting font-display: swap keeps text visible while fonts load, and matching fallback font metrics reduces layout shift when the web font swaps in.

Front-end development: CSS, JavaScript and third-party scripts

When Daylight begins a project, we start with a non-opinionated boilerplate that lets us write lightweight code specific to the project. Many teams use front-end frameworks like Bootstrap to speed up development, but that can add a lot of weight if you don’t strip out unneeded styles and JavaScript.

CSS

We use Sass, which lets us use @extend to write more compact code, and we approach CSS mobile first, which boosts performance on mobile devices. Today it also pays to inline the small amount of critical CSS needed for the first screen, defer the rest and remove unused rules. Lots of small decisions add up to savings down the road, but they must be considered from the beginning.

JavaScript

JavaScript is probably the number one performance drag, because of its weight and also because of how it behaves in the browser. Does the site scroll smoothly? Does it make a laptop’s fan suddenly spin up? Worst case, does the browser freeze or even crash? Long-running scripts are also the main cause of poor INP scores, because the browser can’t respond to a tap while it’s busy.

Again, it’s a balancing act. If you must have an animated carousel, don’t autoplay it. If you must autoplay it, don’t run anything else on the page at the same time. Parallax and scroll effects became popular around the time this post was first written, and they’re still common offenders. Any time events fire constantly, on page scroll or browser resize, you’re potentially looking at trouble. Keep JavaScript animations to a minimum (use CSS animations where possible) and use a debounce function to keep events from firing too often. If you add a lot of event listeners to a page, remove them when you no longer need them. jQuery made this easy (where you use $.on, you can just as easily use $.off), and in plain JavaScript, removeEventListener does the same job.

Beyond that, split code so each page loads only what it needs, defer non-essential scripts and break long tasks into smaller chunks so the page stays responsive.

Third-party scripts

Every time you add a “snippet” of code to your site from a third party, including analytics such as Google Analytics (GA4), marketing automation such as Marketo, and live chat, you affect performance, sometimes drastically. Your business can’t do without some of these tools. Others, less so. Keep this in mind every time someone decides they need to add a new marketing or sales app to the pile, and audit tag managers regularly for scripts nobody uses anymore.

Server-side optimization: caching, CDNs, compression and hosting

The original version of this post focused on the front end, but server-side factors such as compression, caching and content delivery networks (CDNs) matter just as much. They largely determine how quickly the first byte of a page arrives, which sets the floor for every other metric.

  • Compression: serve text files (HTML, CSS, JavaScript) with gzip or the newer Brotli compression.
  • Caching: cache full pages on the server so the CMS doesn’t rebuild them on every visit, and set long browser cache lifetimes for static files.
  • CDN: serve images and other static assets, or whole pages, from servers close to each visitor.
  • Hosting: choose hosting sized for your traffic, keep the server software and CMS up to date, and use a current version of HTTP (HTTP/2 or HTTP/3).
  • Database and plugins: clean up slow queries and remove plugins that load code on every page.

Website performance optimization checklist

  • Measure field data in PageSpeed Insights and Search Console before changing anything.
  • Set a performance budget for page weight and key metrics.
  • Cut unnecessary widgets, feeds and embeds at the wireframe stage.
  • Compress and resize images, use WebP or AVIF, and prioritize the hero image.
  • Set dimensions on images, embeds and ad slots to prevent layout shift.
  • Limit font families and weights, use WOFF2 and preload key fonts.
  • Remove unused CSS and JavaScript, and defer what isn’t needed right away.
  • Avoid autoplaying carousels and heavy scroll effects; debounce scroll and resize handlers.
  • Audit third-party scripts and remove any that don’t earn their place.
  • Turn on compression, page caching and a CDN.
  • Re-test after every major release and monitor Core Web Vitals monthly.

Performance is an ongoing process, not a launch task

A site’s performance depends on too many factors to list in one post. The most important thing to remember is that it isn’t something the developer adds at the end (sadly, there is no “make fast” function). It has to be a consideration from the beginning of the process to the end, and it has to be evaluated and monitored after launch, which is a core part of ongoing website management.

If certain pages have higher abandonment rates than others, check their performance. If that cool animation takes 10 seconds to load, your users may have given up and moved on. Consider running your own A/B tests to find out whether faster speeds increase conversion, or whether that five-slide carousel is really worth the wait.

Treat website performance optimization as a habit shared across strategy, design, development and hosting. Every element you add to a page has a cost, and the fastest code is the code you never ship.

Newsletter

Sign up for the Daylight Newsletter to receive helpful blog posts, insights and featured client projects.

Our Clients

Wacom Logo
Webtrends Logo
Nike Logo
Trinchero Logo
Sutter Home Logo
Ste. Michelle Logo
SheerID Logo
Providence Logo
Newmans Own Logo
Marchex Logo
Intel Logo
Black and decker Logo
Brooks Logo
Coca-Cola Logo
Dakine Logo
No Kid Hungry Logo
American Red Cross Logo
Jackson Family Wines logo
Argyle Winery logo
Wente Vineyards logo
Evanta a Gartner Company
Coeur d’Alene Resort Logo
Travel Oregon Logo
Stanley Logo
Superhuman Logo