Improve Lighthouse Score: A Case Study From 77 to 99 on Mobile
A slow score is rarely one big problem. It is a page that waits for JavaScript before it shows anything. Fix that, and most of the score follows.

If you want to improve your Lighthouse score, the usual advice is a list of fifty audits. Compress images, remove unused CSS, preload fonts, defer scripts. All true, and all hard to prioritize when your mobile score sits in the seventies and you do not know which line matters.
This case study is narrower. It follows one site, mrb2beast.com, from the day it left an AI app builder to the night its mobile score reached 99. It names the five changes that moved the number, the bug the speed test exposed, and the measuring rules that keep you from fooling yourself. Everything here can be checked: the scores come from three local Lighthouse runs on October 20, 2026, and the official re-measurement in PageSpeed Insights is still open.
The starting point: what the scores were
The site was built in Lovable and moved to its own server in October 2026. The move started on October 6 and the new site went live on October 7. The reasons were plain: the builder cost money every month, the build credits ran out, and Claude Code was already paid for through a Max subscription. The full story of that move is in Lovable vs Claude Code.
Before the speed work, the numbers looked like this:
| Page and device | Before | After (3 local runs, October 20, 2026) |
|---|---|---|
| Home page, mobile | 77 in Lighthouse, 73 in PageSpeed Insights | 99 |
| Home page, desktop | no value (measurement error) | 100 |
| Article pages, mobile | 95 | 99 |
| Accessibility, Best Practices, SEO | not recorded | 100 each |
The desktop line is the interesting one. There was no bad score. There was no score at all, and that turned out to be a real bug, not a tool problem. More on that below.
Why sites from AI app builders score low on mobile
Lighthouse on mobile simulates a slow phone on a slow network. Its Performance score is a weighted average of a few metrics: when the first content appears, when the largest element appears, how long the main thread is blocked, and how much the layout shifts. Google's documentation calls 90 to 100 good and warns that a perfect 100 is very hard to reach.
Sites generated by app builders tend to lose points in the same places. They ship a large JavaScript bundle and tell the browser to fetch it early, so the script competes with the page itself for the first second. Content often animates in, which means it starts invisible and waits for JavaScript. Web fonts swap in late and push text around. Images arrive at full size.
None of that is a scandal. It is what you get when the default goal is a working app, not a fast first paint. The fix is to change the goal for the pages that need to be fast: articles, the home page, anything a search engine or a reader lands on.
Five changes that took mobile from 77 to 99
The work happened in one night with Claude Code. The site runs on TanStack Start, which renders pages on the server. That matters, because the first change only works when the server already sends the full page.

1. Make the page complete without JavaScript
Open your page with JavaScript turned off. If the text, images and links are there, you can treat the script as an extra. If the page is empty, no amount of tuning will get you to 99, because the browser has to download and run code before it can show anything.
On this site, every hub page and article renders fully on the server. Crawlers get the same HTML as readers.
2. Load the client bundle after the first paint
This was the biggest single change. The framework added preload links for its scripts in the head and an entry script in the body. On a slow mobile connection, all of that competed with the HTML and fonts before anything was painted.
The site now removes the preload links and starts the entry script only after the browser reports its first contentful paint. Hydration follows a moment later. A fallback timer covers tabs that never paint. A first attempt that waited for the next animation frame was not enough, because that frame sometimes fired before the first paint and the race continued.
3. Inline the CSS
A separate stylesheet is one more request that blocks the first paint. The site inlines its CSS into the HTML, so the page can be drawn from the first response alone.
4. Never hide what is on screen at load
Scroll animations are the quiet score killer. If a heading starts at zero opacity and waits for JavaScript to fade in, the largest element on the page appears late, and so does your score.
The rule on this site: reveal effects only apply to elements that start off screen. The check uses the first callback of an IntersectionObserver instead of measuring element positions, because measuring every element on load would undo the browser's own rendering shortcuts. Hero words move by transform only, so they are visible from the start.
5. Size fonts and images before they arrive
Two smaller changes closed the gap. The fallback fonts are tuned with size-adjust so the swap to the web font does not move text or create a new, later largest element. And the media route serves WebP variants in two widths when the browser accepts WebP, with srcset on article images, so a phone never downloads a desktop image.
The bug the speed test caught
Remember the missing desktop score. After the move, a CSRF check in the code carried over from the builder rejected requests with a 403 once the site sat behind its own server. The home page loaded, then broke as soon as its scripts tried to fetch data. Nobody noticed at first, because the server HTML looked fine.
It surfaced only because PageSpeed returned no value on desktop. The cause was the proxy: TLS ends at the web server in front, so the app saw a plain HTTP request while the browser said HTTPS, and the check treated that mismatch as an attack. The fix compares the host correctly behind the proxy.
The lesson is bigger than the bug. A speed test runs your page in a clean, unusual browser. That makes it a free smoke test. If a tool cannot measure your page, find out why before you blame the tool.
How to measure without fooling yourself
Lighthouse scores move from run to run. Google's own documentation lists the reasons: network conditions, the load on your machine, browser extensions, even antivirus software. A single run that shows 99 proves very little.
The rules this site follows:
- Run three times and compare medians. One run is a mood, three runs are a measurement.
- Compare against the same build. Measure your change and the current main branch under the same conditions, not against a number from last week.
- Test the production build. Development servers skip compression and bundling, so their scores are meaningless.
- Use PageSpeed Insights as the referee. It runs on Google's hardware and adds real user data once you have enough traffic. The official re-measurement for this site is still open, so treat 99 as a lab result.
- Watch the field data, not just the lab. Search Console's Core Web Vitals report shows what real visitors experience. That is the data Google describes as part of page experience.
A checklist to improve your Lighthouse score
Run this on your own site in this order, because each step makes the next one easier to judge:
- Turn off JavaScript and load your slowest page. Is the content there?
- Run Lighthouse on mobile three times on a production build. Write down the median and the largest contentful element.
- Check whether that largest element starts hidden or waits for a script. If yes, show it from the start.
- Look at the network waterfall before the first paint. Remove or delay every script that is not needed to draw the page.
- Inline critical CSS or the whole stylesheet if it is small.
- Give fallback fonts matching metrics and serve images in the size the device needs.
- Run three more times. If a tool cannot measure a page at all, treat it as a bug report.
For a site that is still inside an app builder, step 1 decides your path. If the builder cannot render on the server, the ceiling is low. That was one of the reasons for the move, and the guide to Claude Code best practices covers how the site is now built and checked. If you want to see what else runs on the same server, what Claude Code does for a solo builder lists the jobs.
Lighthouse vs Core Web Vitals: what this case study does not prove
One site is one site. Its pages are mostly text with a few images, which is the easy case. A shop with filters, a dashboard or a page full of embeds has different problems.
The numbers are lab numbers from local runs. They are a strong hint, not a ranking factor. Google says its ranking systems look at page experience as a whole, with Core Web Vitals measured from real users, so a faster page helps most when it also has something worth reading.
And the score is not the goal. A page that shows its content at once is better for the reader on a train with one bar of signal. The 99 is just how Lighthouse writes that down.
FAQ
What is a good Lighthouse score? Google's documentation colors 90 to 100 green and calls it good, 50 to 89 needs improvement and 0 to 49 is poor. A perfect 100 is very hard to reach and not necessary. Aim for 90 or more on mobile for the pages people land on.
Why is my Lighthouse score lower on mobile than on desktop? Mobile tests simulate a slower phone and a slower network. Every script that runs before the first paint costs more there. The fix is usually the same as in this case study: send complete HTML and load JavaScript after the page is visible.
Does the Lighthouse score affect SEO? Not directly. Google uses Core Web Vitals from real users as part of page experience, and Lighthouse is a lab test that helps you improve those metrics. A good score is a means, the content still decides most rankings.
Why does my Lighthouse score change every time I run it? Network conditions, the load on your computer, browser extensions and server response times all vary between runs. Run three times on a production build, compare the median and use PageSpeed Insights as the referee.
Can you get a good Lighthouse score with an AI app builder? You can improve it, but the ceiling depends on whether the builder renders pages on the server and lets you control script loading. This site reached 99 on mobile only after it moved off the builder to its own server.
About the author
Tristan Eilenburg. One person. AI systems. Global reach. I write about building systems that work, with evidence instead of hype.
- X: @MrB2Beast
- LinkedIn: Tristan Eilenburg
- Instagram: @mrb2beast
- GitHub: mrb2beast
The newsletter goes out twice a week: AI news on Wednesday, the lesson of the week on Sunday.
Sources (checked November 27, 2026)
- Chrome for Developers (2026). Lighthouse performance scoring. https://developer.chrome.com/docs/lighthouse/performance/performance-scoring
- Chrome for Developers (2026). Introduction to Lighthouse. https://developer.chrome.com/docs/lighthouse/overview
- GoogleChrome (2026). Lighthouse score variability. https://github.com/GoogleChrome/lighthouse/blob/main/docs/variability.md
- Google Search Central (2026). Understanding Core Web Vitals and Google search results. https://developers.google.com/search/docs/appearance/core-web-vitals
- web.dev (2026). Web Vitals. https://web.dev/articles/vitals
- web.dev (2026). Best practices for fonts. https://web.dev/articles/font-best-practices
- MDN Web Docs (2026). size-adjust descriptor. https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/size-adjust
- MDN Web Docs (2026). PerformancePaintTiming. https://developer.mozilla.org/en-US/docs/Web/API/PerformancePaintTiming
