Web-en

Google PageSpeed Insights solve issues and get green

Google PageSpeed optimization

Google PageSpeed Insights [1] is a great tool to see how your website perform. In case you got a poor score, here is a series of articles with easy to implement solutions to solve most of the issues.

Google PageSpeed Insights

This allowed me to go green on the Google PageSpeed Insights [1], going up from a score of 17 on mobile (Fig 1) to 89 (Fig 14), and up from 35 (Fig 3) to 89 on desktop (Fig 16).

Google PageSpeed Insights solve issues and get green : Fig 1 : Google Page Speed - Score before image optimization of 17 on mobile
Google PageSpeed Insights solve issues and get green : Fig 1 : Google Page Speed – Score before image optimization of 17 on mobile
Google PageSpeed Insights solve issues and get green : Fig 3 : Google Page Speed - Score before image optimization of 35 on desktop
Google PageSpeed Insights solve issues and get green : Fig 3 : Google Page Speed – Score before image optimization of 35 on desktop
Google PageSpeed Insights solve issues and get green : Fig 14 : Google Page Speed - Score after activating gzip compression of 89 on mobile
Google PageSpeed Insights solve issues and get green : Fig 14 : Google Page Speed – Score after activating gzip compression of 89 on mobile
Google PageSpeed Insights solve issues and get green : Fig 16 : Google Page Speed - Score after activating gzip compression of 89 on desktop
Google PageSpeed Insights solve issues and get green : Fig 16 : Google Page Speed – Score after activating gzip compression of 89 on desktop

Step 1: optimize images for web

This allowed me to pass the Google PageSpeed [1] test Optimize images [2] on a website, going up from a score of 17 on mobile (Fig 1) to 51 (Fig 2), and up from 35 (Fig 3) to 59 on desktop (Fig 4).

Optimize Images PageSpeed Insights Google Developers
Mass process and update a batch of images using GIMP [3]

Step 2: CSS and javascript optimization

Eliminate render-blocking JavaScript and CSS in above-the-fold content.

This allowed me to pass the Google PageSpeed [1] test Eliminate render-blocking JavaScript and CSS in above-the-fold content (along with Leverage browser caching [6]) on a website, going up from a score of 51 on mobile (Fig 5) to 72 (Fig 6), and up from 59 (Fig 7) to 79 on desktop (Fig 8).

Fix Google PageSpeed Eliminate render-blocking JavaScript and CSS in above-the-fold content [4]

Google PageSpeed Insights solve issues and get green : Fig 2 : Google Page Speed - Score after image optimization of 51 on mobile
Google PageSpeed Insights solve issues and get green : Fig 2 : Google Page Speed – Score after image optimization of 51 on mobile
Google PageSpeed Insights solve issues and get green : Fig 4 : Google Page Speed - Score after image optimization of 59 on desktop
Google PageSpeed Insights solve issues and get green : Fig 4 : Google Page Speed – Score after image optimization of 59 on desktop

Step 3: enable web browser cache

Leverage browser caching allowed me to pass the Google PageSpeed [1] test Leverage browser caching [5] (along with Eliminate render-blocking JavaScript and CSS in above-the-fold content [4]) on a website, going up from a score of 51 on mobile (Fig 9) to 72 (Fig 10), and up from 59 (Fig 11) to 79 on desktop (Fig 12).

Leverage Browser Caching PageSpeed Insights Google Developers
Fix Google PageSpeed leverage browser caching in htaccess [6]

Google PageSpeed Insights solve issues and get green : Fig 5 : Google Page Speed - Score before eliminating render-blocking JS and CSS in above-the-fold content of 51 on mobile
Google PageSpeed Insights solve issues and get green : Fig 5 : Google Page Speed – Score before eliminating render-blocking JS and CSS in above-the-fold content of 51 on mobile
Google PageSpeed Insights solve issues and get green : Fig 6 : Google Page Speed - Score after eliminating render-blocking JS and CSS in above-the-fold content of 72 on mobile
Google PageSpeed Insights solve issues and get green : Fig 6 : Google Page Speed – Score after eliminating render-blocking JS and CSS in above-the-fold content of 72 on mobile
Google PageSpeed Insights solve issues and get green : Fig 7 : Google Page Speed - Score before eliminating render-blocking JS and CSS in above-the-fold content of 59 on desktop
Google PageSpeed Insights solve issues and get green : Fig 7 : Google Page Speed – Score before eliminating render-blocking JS and CSS in above-the-fold content of 59 on desktop
Google PageSpeed Insights solve issues and get green : Fig 8 : Google Page Speed - Score after eliminating render-blocking JS and CSS in above-the-fold content of 79 on desktop
Google PageSpeed Insights solve issues and get green : Fig 8 : Google Page Speed – Score after eliminating render-blocking JS and CSS in above-the-fold content of 79 on desktop

Step 4: Enable compression htaccess

Enabling compression in htaccess allowed me to pass the Google PageSpeed [1] test Leverage browser caching [7] on a website, going up from a score of 72 on mobile (Fig 13) to 89 (Fig 14), and up from 79 (Fig 15) to 89 on desktop (Fig 16).

Google PageSpeed Insights solve issues and get green : Fig 9 : Google Page Speed - Score before leveraging browser caching of 51 on mobile
Google PageSpeed Insights solve issues and get green : Fig 9 : Google Page Speed – Score before leveraging browser caching of 51 on mobile
Google PageSpeed Insights solve issues and get green : Fig 10 : Google Page Speed - Score after leveraging browser caching of 72 on mobile
Google PageSpeed Insights solve issues and get green : Fig 10 : Google Page Speed – Score after leveraging browser caching of 72 on mobile
Google PageSpeed Insights solve issues and get green : Fig 11 : Google Page Speed - Score before leveraging browser caching of 59 on desktop
Google PageSpeed Insights solve issues and get green : Fig 11 : Google Page Speed – Score before leveraging browser caching of 59 on desktop
Google PageSpeed Insights solve issues and get green : Fig 12 : Google Page Speed - Score after leveraging browser caching of 79 on desktop
Google PageSpeed Insights solve issues and get green : Fig 12 : Google Page Speed – Score after leveraging browser caching of 79 on desktop

Optimizing encoding and transfer size of text-based assets — Web Fundamentals
Fix Google PageSpeed enable compression in PHP and htaccess [8]

Google PageSpeed Insights solve issues and get green : Fig 13 : Google Page Speed - Score before activating gzip compression of 72 on mobile
Google PageSpeed Insights solve issues and get green : Fig 13 : Google Page Speed – Score before activating gzip compression of 72 on mobile
Google PageSpeed Insights solve issues and get green : Fig 15 : Google Page Speed - Score before activating gzip compression of 79 on desktop
Google PageSpeed Insights solve issues and get green : Fig 15 : Google Page Speed – Score before activating gzip compression of 79 on desktop