February 13, 2025 by Henrik Karlström

How to ace the Google Lighthouse speed test

Google Lighthouse is the standard tool for measuring website performance. The basic fixes get you a decent score. The top marks take optimization all the way down to the HTML.

The basics

These are the steps everyone talks about. They're fairly simple and make a noticeable difference:

1. Use images of the right size

  • Resize images to the dimensions they're shown at.
  • Don't scale large images down with CSS.

2. Remove third-party JavaScript

  • Scripts from plugins, widgets and tracking pixels slow your site down.
  • Only keep the third-party scripts you really need.

3. Use modern image formats

  • Serve images as WebP or AVIF for better compression at the same quality.

4. Use a CDN

  • A content delivery network serves your site from close to your visitors.
  • It also handles traffic spikes.

5. Set caching headers

  • Set Cache-Control headers on the server that hosts your site.
  • Give static files long cache lifetimes, so the browser doesn't download them again.

6. Lazy load and remove render-blocking resources

  • Lazy load images and iframes below the fold.
  • Defer CSS and JavaScript that the first view doesn't need.

These steps get you a decent score. For the top marks you have to go further.

Going all the way

1. Inline only the critical CSS

  • Inline the CSS the page actually uses, right in the HTML.
  • Don't make the browser download a full stylesheet before the first paint.

2. Really minimize JavaScript

  • Use CSS and plain HTML wherever you can, also for animations.
  • Only include the code a page needs. No global JavaScript on every page "just in case".

3. Images for every screen size

  • Make several versions of every image and let the browser pick with srcset.
  • A large desktop screen needs a different image than an older phone.
  • Set width and height on every image, so the page doesn't jump when it loads.

4. Load the first image early

  • Preload the largest image above the fold and give it fetchpriority="high", so the largest contentful paint comes sooner.

5. Inline SVGs

  • Put icons and logos as SVG directly in the HTML instead of loading them as files.
  • Fewer requests, and they can be styled with CSS.

6. Host fonts yourself and load only what you need

  • Host fonts, Google Fonts included, on your own server.
  • Load only the character sets the page uses, and preload the most important font files.
  • Use a fallback font with the same metrics, so text doesn't move when the web font arrives.

7. Minify everything

  • Minify HTML, CSS and JavaScript, and shorten class names.

Flipsite does all of the above for you, automatically, on every publish.

Why it matters

Faster pages keep visitors: even a one-second delay increases bounce rates. Google uses page experience as a ranking signal, and faster sites tend to convert better. Most traffic comes from phones, often on slow connections, and lighter pages also cost less to host.

A high score matters as a sign of a site that is fast, usable and easy for search engines and AI assistants to read.

What we did about it

All of this can be done by hand, but it's tedious, and it breaks the first time someone adds a page in a hurry. We know, because we struggled with it ourselves. Flipsite started as a compiler that does it automatically, every time you publish.

Many builders score well on SEO and Best Practices, but not on performance. Test their own home pages in PageSpeed Insights on mobile, or see the results in our comparisons. For what can lower your own score, see Score 100 on every Lighthouse test in the Help Center.

Further reading

Start building with your AI

Free to start. Connect Claude, ChatGPT or Cursor, fine-tune it in the editor, and host it anywhere.

Get started for free
Flipsite

©2026 Flipsite. All rights reserved. Made in the EU 🇪🇺 🇦🇽