How to Accurately Measure Your PageSpeed Score


Jul 29, 2019



Well, can’t we just go to PageSpeed Insights or web.dev 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. But, 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 working with large e-Commerce & B2C websites on improving their Site Speed & Scalability. He frequently tweets here.
Punit Sethi


ALSO READ

SEO Impact of Lazy Loading Images

Google actively recommends boosting website speed by lazy loading off-screen images. But, a worry with lazy loading images is it's possible negative SEO impact. Google (like on most things SEO) does not clarify on this. This leaves marketers in a lot of confusion whether to risk the SEO benefits in exchange of speed improvements. In this post, we try to unravel this issue.  ...continue reading

We work on website speed, front-end architecture & scalability for large e-Commerce & B2C websites. This blog contains posts based on our experiences from our work. To be notified on a new posts, please submit your email address: