Using the Varvy method is an option if you are a tech-savvy user and are willing to edit the code directly on your site to use the snippet from Varvy.
It is also possible to automatically defer scripts from loading in your child theme’s functions.php file by adding a small code snippet to the file. Let’s start with the first method:
At the top, you can enable the plugin’s functionality and choose between async and defer.
You can choose how jQuery will be handled further down the page. You might break your website’s core functionality if you try to defer parsing your jQuery scripts. If you want to be safe, you’ll want to exclude jQuery, but if you want to experiment with deferring it, that’s fine too. Test your website before launching.
There is also a nice user-friendly feature that lets you target specific themes or plugins that are active on your site by choosing whether they should be deferred or not, as well as the ability to manually include or exclude specific scripts from being delayed.
2. Use the WP Rocket Plugin
The WP Rocket plugin is one of the few caching plugins we allow because it has built-in integration for server-level caching that integrates smoothly with the WP Rocket plugin.
Use Varvy’s Recommended Method
By tweaking the code snippet that Varvy supplies and then adding the script directly before the closing tag of the body tag, you can implement this method by using the code snippet Varvy supplies as a template.
You can find more articles like this at Seahawk Media Blog.
Looking to make your WordPress site fast? Opt for our WordPress speed optimization service.