Lighthouse & pagespeed insights performance score is inconsistent

2.5k views Asked by At

I have a simple html file below and when i run an lighthouse audit, the performance score is different each time. I'm using chrome, no other programs running in the background. I sometimes get 99, then other times 65, then other times 77.

<html>
<head>
</head>
<body>
test
</body>
</html>

This is the same issue i have with Google pagespeed insights. My webpage loads instantly but i can't even get over 15 score in pagespeed insights, highest is 55. How do i even debug, if there is no consistency? How do i solve?

1

There are 1 answers

0
UrbanwarfareStudios On

With my recent experience I feel your pain.

Fair enough there should (could) be differences in the network between 2 requests for which you have made no new changes, server could be busier - so your performance score can vary just on that - if in doubt request it serval times and work on the average.

If its always bad (speed index) even after a lot of optimisation then perhaps your server is part of the problem.

I have seen so many differences between requests for the indentical page with indentical code. It doesn't seem to give you everything together - once you clear the first errors or recommendations you will often get new unrelated ones showing up. Minify your CSS then it will tell your images are low resolution or out of ratio.

My advice keep a log of your scores (on paper or excell) with a summary of what you changed.

I know it is tempting to keep changing lots of the recommendations at once - but try to limit it to one at a time, this will make it much easier to see if the changes have worked and if that caused another problem, or caused something else to get noticed.

Also bare in mind once you start implementing recommendations there is a chance your score can get worse before it gets better.

Don't get fixated on a 100/100/100/100 - its quite possible to get a perfect score with an inaccessible site - so don't ruin your site or your UI for the perfect score.

One last point when changing CSS/JS files make sure the filename is different to ensure it grabs the lastest file in the request, adding a ?v=1 after the filename should do the trick.