今日已更新 166 条资讯 | 累计 40611 条内容
关于我们

Lighthouse says 86. Run it again: 91. Building a free local console for scores you can defend

Simon 2026年09月03日 05:18 2 次阅读 来源:Dev.to

You know this loop. A page feels slow. You open the Lighthouse panel in DevTools, hit Analyze, and get 86 . You change nothing, run it again, and get 91 . You run it a third time out of spite: 78 . Now which number goes in the PR description? This isn't a bug. Total Blocking Time is CPU-sensitive and worth roughly 30% of the Performance score, so anything else your laptop is doing — a Slack notification, a Docker build, Spotlight reindexing — moves the number. Lighthouse Performance realistically swings about ±5 points on identical runs of an identical page. One run is an anecdote. And the tool that would give you a stable, real-world answer — PageSpeed Insights — needs a public URL, so it can't audit the thing you're actually working on. I got tired of this and built LightAudit Score : a local console that runs Lighthouse on your own machine, repeats it enough times to mean something, and keeps the results. It's free. Not "free tier" — free, MIT, no account, no usage cap. The three gaps, concretely 1. Reach: PSI needs a public URL, your work isn't public PageSpeed Insights is excellent and I use it constantly. It also cannot audit: localhost:3000 , which is where the change you just made lives a staging box behind a VPN the internal app that nobody can link to a preview deploy that dies in an hour The usual workaround is a tunnel, or "we'll check it after deploy," which means checking it after it's a problem. LightAudit runs the same Lighthouse v13 engine against your own Chrome. If your browser can open it, LightAudit can audit it — localhost, staging, VPN, intranet, all through exactly the same pipeline. 2. Accuracy: make the number boring This is the part I care about most, because a score you can't reproduce is a score you can't act on. Median of N. Every URL is audited N times (default 3), and Lighthouse's own computeMedianRun picks the representative run. Not the average — the actual median run, with its real trace. Isolated Chrome per run. Every run launches

本文内容来源于互联网,版权归原作者所有
查看原文