How to Accurately Measure Your PageSpeed Score

Jul 29, 2019

Well, can’t we just go to PageSpeed Insights or measure, slap our dear URL and know the scores? Unfortunately, the answer is ‘No’. Read on to know why and what you can do about it.

Let’s Talk Lighthouse

Google’s Lighthouse is the underlying tool that gives us our PageSpeed scores and insights. It visits the URL we provide and captures performance timings for the visit. It uses only these performance timings (and not the audits under Diagnostics and Opportunities section) to derive PageSpeed score. Higher the timings, lower the score.

Can My Lighthouse Scores Fluctuate?

If visits to your website’s URL lead to fluctuating performance timings, Lighthouse scores for these visits will also fluctuate. Larger the fluctuation in timings, larger the fluctuation in scores. Performance timings can fluctuate due to server side, network related or client side issues. More on this later in this post.

PageSpeed scores fluctuate if performance timings fluctuate

Why Not PageSpeed Insights?

When you enter your URL on the PageSpeed Insights webpage, Lighthouse accesses the URL via a machine physically located in the US. If majority of your traffic is from non-US location (say, India) and your servers are (rightly) located close to where your visitors are, your PageSpeed Insights score will be considerably lower. This is because of two factors:

  • The longer physical distance between the client and the server translates into higher latency. Higher latency translates into slower performance.
  • Your CDN cache may not be warmed for US location leading to CDN cache misses. These would be notably slower than CDN hits.

So, an ideal solution is to run Lighthouse (the underlying engine of PageSpeed Insights website) from a location where majority of your visitors come from.

For accurate Performance scores, run Lighthouse from a country or region where majority of your visitors come from.

Running Lighthouse From Anywhere

Google ships Lighthouse as part of Chrome devtools. This allows you to run Lighthouse from any machine you have Chrome browser installed:

Access Lighthouse from Chrome >> Devtools >> Audit tab
Access Lighthouse from Chrome >> Devtools >> Audit tab

To obtain accurate PageSpeed scores, it is recommended to audit via the Lighthouse that ships with Chrome:

  • From a country / region where most of your visitors reside.
  • From a decently sized client machine that doesn’t have any performance issues of it’s own.
  • From a client machine where other tasks are not running for duration of the Lighthouse test.
  • Over a consistent & reliable network.
  • Atleast thrice (while selecting the median score) to avoid any temporary variance.

The above approach will ensure your PageSpeed / Lighthouse scores are accurate and not fluctuating. In case if you still observe fluctuations in your Lighthouse scores, these shall be due to server-side performance issue(s).

Performance auditing your URLs via Lighthouse from a decently sized client machine over a reliable network will ensure accurate and repeatable Lighthouse scores.

Accurately measure your PageSpeed Score

About the Author
Punit Sethi has been Performance Engineer for a decade working on improving speed of websites. He frequently tweets here.
Punit Sethi

Previous Post

Invalidating Varnish Cache Without Performance Impact

This post details how you can invalidate or refresh Varnish cache without performance impact during cache invalidation for high traffic websites....continue reading

We blog about Site Speed, it's impact on Site Goals and what can be done about it. Join the mailing list to be notified of new posts (about twice a month).