Pagespeed Insights works using several metrics it calculates by loading a site, and measuring the load time of several elements during the page load. The first score Pagespeed Insights shows is the Mobile Score, which is somewhat deceptive. First off, mobile-first web development is an extremely valid thought-process that can, and should be embraced by more web developers. However, mobile is first by default, and isn’t immediately obvious.
Also, let’s talk about the load times and metrics used by Pagespeed Insights.
Download Speeds
Here, you will see a screenshot of a typical load time calculations Pagespeed Insights gives on a site. Now, overall, the numbers seem quie alarming. Over 4 seconds for the first contentful paint(when the first image or text appears), 10 seconds before you can interact? This can’t be real!
That’s because it isn’t. Google Pagespeed Insights measures pagespeed using a simulated 3G network speed of 1,638.4 Kbps, or 1.64 Mbps. The average download speed on mobile in the United States is currently 74.83 Mbps. That’s right, your pagespeed score is being calculated by a download speed that is FOURTY FIVE TIMES slower than the national average.
According to Speedtest.net, the slowest mobile download speeds in the United States are in Alaska, at 27.15 Mbps, which is still multitudes faster than the chosen, throttled 1.64 Mbps. Now, what is even more amazing is this information is hidden by a click-through tool tip and is not well-explained. It also states that it is using North America as the chosen throttle location at all, which, using the established average download speeds of North America, make no sense at all.
What are Opportunities?
Pagespeed Insights list things that can improve pagespeed(load time) as ‘Opportunities’. This is to avoid any sort of negative connotation given if called ‘errors’ or ‘problems’ or ‘issues’. While this appreciated, Pagespeed Insights also uses visual language to convey that the things Opportunities are issued are ‘bad’.
Red in visual UI is ‘bad’, Orange is ‘Warning’, and Green is ‘Good’. This is something we have been taught since we can recognize traffic lights. Using Reds with triangles akin to warning signs is alarmist UI that, for non-technical people, screams that ‘This is a problem!’.
The other problem ‘Opportunities’ has, is that some of the opportunities listed are somewhat bogus. I can demonstrate this using Hebrew National Hotdogs’ website. Here, you can see the scores from Pagespeed Insights. We can see that the site has a ‘Speed Index’ of 4.9s seconds(if you see a different speed, I’ll get to that later), and a First Contentful Paint of 2.2 seconds.
Now, on the lower part, you will see the Opportunities listed.
- Properly size images – 1.05s
- Reduce unused javascript 1.05s
- Eliminate render-blocking resources – 1.01s
- Serve images in next-gen formats – 0.3s
- Minify Javascript – 0.15s
- Efficiently encode images – 0.15s
All together, that will be a speed savings of 3.71 seconds.
This is implying that with these modifications, the site will load in 1.19 seconds. This just is not possible. At best, the site can get to 1.8 seconds; a lot of these numbers are based on theoretical loads and have no basis in real use-cases.
Let’s talk about the most common of these opportunities.
Properly Size Images
This one is not as bad and should be a best practice; making sure images have the right size and aspect ratio, so you aren’t loading 3 Mb image files where a 200kb properly cropped image will work just fine.
Reduce unused Javascript
This one is a funny one. While it is true that on site builds, you would have large amounts of javascript that are intended for a utility on one page, but no others. Larger websites are notoriously guilty of this and this can definately cause slowdown.
However, one thing I want to note is Google Tag Manager is part of the list of ‘unused javascript’. Both Tag Manager and Google Analytics, as well as other analytics platforms have their tracking javascripts listed on this Opportunity. It is quite funny that Google dings you for pagespeed for using Google Analytics, isn’t it?
Minify Javascript
Minification five years made sense to an extent. Back when we were using 3G mobile speeds, 22 kilobytes could matter, but in a calculation, 22 Kb will be downloaded in 0.00234 sections on a modern mobile device. Negligable and a savings that is unnoticable, and is certainly not 0.2 seconds they claim.
Gone are the days we sacrifice human readable code for fractions of a second of download speed.