The pitfalls of Page Speed Insights recommendations

Google's Page Speed Insights in itself is a good tool, based on a good idea. I've even recommended it myself in the past, when I talked about ways to make your site better. The problem with it is that it tends to sets unrealistic expectations and forces you to make changes for its sake and not that of the user.

In more than one occasion I've received a link towards a website evaluation with one, simple request: increase the score up to 90 percent on mobile. But here's the thing: people who ask for this don't really know what they actually want.

Now, some of the recommendations are actually common sense: minimize assets size, defer loading for offscreen elements, a good cache policy, avoiding layout shifts and so on. So you have to do them because it's the right thing to do, not because Google tells you so. However, in the real world not everything is perfect and there are trade-offs.

Case in point: after spending a good couple of hours of optimizing a website, taking the preproduction instance from a score of 20-something to over 60, I pushed the changes live. The new score actually got worse! That's because the production version also had Google Tag Manager, Facebook SDK and Cookiebot which pretty much nullified all my effort and then some. Not only that, by defering the image load, we also had some complains that the images were not yet ready when some users scrolled to them.

True, some improvements were needed but most of them were done for the sake of a 3rd party's tool, to get a better score there. And then it turns out you cannot really get that good of a score in the real world due to other business needs. So this becomes wasted effort that could have been spent on more pressing concerns.

So, please, don't go chasing scores. Test the website on a real device, with a slow connection, like 3G. Is the site usable? Then great. Is it painfully slow? Then fix that, not some external score.