Skip to content
online
env0.46.1 · 1d135e2

A fast website that stays fast

Making a website fast once is easy. Keeping it fast while you keep adding features is the hard part: every new component, font or library makes the page a little heavier, and nobody notices until the site feels slow. So we stopped treating speed as a one-off audit and made it a test that every…

Illustration: four score gauges at 100 above a chart where the first measurements exceed the budget line and the rest stay below it.

Making a website fast once is easy. Keeping it fast while you keep adding features is the hard part: every new component, font or library makes the page a little heavier, and nobody notices until the site feels slow. So we stopped treating speed as a one-off audit and made it a test that every change has to pass.

Where we started

When we first measured this site seriously, the layout jumped as it loaded (a Cumulative Layout Shift around 0.2) and the main content took 4 to 6 seconds to appear on a throttled mobile connection. The main stylesheet weighed 41 KB compressed, mostly because components and validation code meant for the admin area were also shipped to visitors.

What we changed

  • Visitors get only visitor code. The admin UI library and the form-validation library no longer reach the public site. A test walks the site’s imports and fails if either sneaks back in.
  • CSS only for what’s on the page. The main stylesheet went from 296 KB to 98 KB, and to 16 KB compressed.
  • Fonts that don’t shift the layout. Key fonts are preloaded and the page no longer prefetches code it may never need.

The test that keeps it that way

On every pull request, CI builds the site, serves it the way production does — HTTP/2, TLS, compression — and runs Lighthouse three times on four key pages, taking the median. The budget: every score at least 95, the largest content visible in under 2 seconds, layout shift under 0.1, main-thread blocking under 200 ms. If a change breaks the budget, CI turns red and the change doesn’t merge. An accessibility check runs alongside it and currently finds no WCAG AA violations on the pages it covers.

The result

In CI the pages score 100 in all four Lighthouse categories, with the main content visible in under one second. On the live site the home page scores 100 with the main content in about 1.2 seconds, and a product page scores 98.

We’re also honest about what isn’t perfect yet: pages in Japanese and other CJK languages are slower, because their fonts are much larger. That has its own task.

Why it matters to you

A slow page loses visitors before they read a word, and search engines notice too. If you’re building a landing page or a store with us, this budget comes with it — it’s part of how we work, not an extra.

Talk to us about your site