Whenever a visitor comes to your website, the internet browser first loads all the necessary JS and CSS files before the HTML. If these files are loaded completely, the web browser isn’t able to render the page before that.
The good thing is you can postpone the loading of some scripts without causing problems. A few modifications can be made by website owners to their site for preventing the web browsers from loading any codes outside those that are necessary for loading that upper part of your website that is immediately seen by the user. Simply speaking, the browser only loads the essential files for that particular section before a user scrolls down the page. This area is called ATF i.e. Above The Fold. The other part that users need to scroll down to be able to see is called the non-ATF section.
So if your website is loading the JS and CSS codes that are related to non-ATF sections, the pages are going to take a longer time to load. That is why Google tries to tell you to stop running these unnecessary resources in the website’s codes.
The Defer approach is that it allows the browser to download JS while parsing HTML parts and it does not execute the script unless and until the HTML parsing is over.
1. Autoptimize Plugin
Autoptimize is a great plugin that is specifically designed to address the problems suggested by website analysis tools such as Google PageSpeed Insights. What it does is, improves the delivery of JS and CSS files without giving much attention to other aspects that affect website performance. It will give you the basic optimization features. Another good thing about this plugin is it will convert the website’s images to optimized WebP format.
Upon installation and activation of Autoptimize, check the boxes “Optimize JavScript Code” and “Optimize CSS Code” options that are there in the plugin’s settings. Do not check other boxes that might aggregate the CSS and script files. This plugin is available for free and you can also take the benefits of its premium packages.
2. WP Rocket
3. W3 Total Cache
You can use this plugin absolutely free by downloading it from the WordPress.org website.