PageSpeed Insights Suggestions Explained
Posted on August 14, 2016
You may have been forwarded results from Google's PageSpeed Insights or Pingdom before. It is certainly a great tool, but some of those items will have little to no impact, or be impossible to fix with your current website setup.
Here we will break them down a bit so you can determine which are going to be the best 'bang for buck' to fix.
Avoid landing page redirects
If your website is running on 'https' (because you should be!) and 'www', then you want to make sure any links to your website, both internally and externally, are using this format.
You should be '301 redirecting' all other variations of your website in case they do get accessed, but you don't want to be sending users to the wrong URL and making them wait for those redirects to happen.
Right: https://www.yourcompanyname.com.au Wrong: http://www.yourcompanyname.com.au Wrong: https://yourcompanyname.com.au Wrong: http://yourcompanyname.com.au
This should be fairly easy to fix yourself. Providing the redirects are already in place (most major CMS's such as WordPress will do this for you), then just make sure you are using the correct variation of your URL.
WordPress is very guilty of this one.
It will load in lots of files from various plugins, and just dump them at the top of your page. What happens now is that your visitors need to wait to download these files individually before the page can actually start to display in their browser.
In reality, a lot of these extra files relate to the 'pretty' stuff, and are not required to display the important content to the user. So you can actually defer these to be the last thing loaded on the page as opposed to the first.
This can be hard to fix by yourself so check with your developer first.
When a developer writes any code, it's generally written to be nice and readable to them. However, your web browser doesn't care for the hidden comments or pretty spacing.
By 'minifying' these documents you can strip out all of the unnecessary 'bloat' and reduce the filesize that the user has to actually download.
Your CMS should have a plugin for this, otherwise refer to your developer. Our favourite plugin to do this in WordPress is Autoptimize.
Apologies for the American spelling - just wanted to stick with their exact wording.
Take note of the actual measurements returned. Sometimes it will say it is a 60% savings, but it's on a 2kb image, which is not worth your time to fix (unless you have a lot of free time).
One of our favourite tools to run your images through is Bulk Resize Photos - do this before you even upload them to your website. If you didn't guess from the name, you can actually dump a whole bunch of images in there at once and it will send the optimised images right back to you.
To put a number on it, perhaps any savings over 50kb is definitely worth fixing up right now. There are plenty of tools and plugins to do this available for all CMS's.
Leverage browser caching
Some of these will be impossible to control, such as Facebook share buttons, Google Analytics or Google Tag Manager, so you can ignore these.
For anything else that rarely changes, such as images, you can easily set the cache time via your .htaccess file. Your syntax may vary slightly depending on your hosting provider but start with something like so: