It is always good to have a faster loading website. There are lots of reasons which weigh your website down from flying up. And comments in WordPress website could be a potential culprit. In this…
</body> tag. Read the instructions given below to use this script.
Don’t forget to take a complete back-up before making any changes in the code. If something went wrong, you can use that back-up to go back.
- Copy the code and paste it in HTML file just before the
</body>tag (near the bottom of HTML file).
- Save changes. And you are done.
- Finally, test your website again to see the effect.
If you want to defer multiple scripts in one go. You can use the same script with little modification. In the following code replace defer1.js, defer3.js, and defer3.js etc. with the link of scripts which you want to defer.
You can defer parsing of JavScript in WordPress by following methods:
- Using WordPress Plugins
- Using script mentioned above
Script Method – Script mentioned above
In WordPress, the code mentioned above can be placed in HTML file just before the
</body> tag using hook content option. Most of the popular WordPress themes come with hook content provision. If you are not using hook content option or it is not available in your theme. Then you can place the script in the footer file just before the
</body> tag .
Other than this method, you can also use
More to read:
Learn how to Write a Great Blog Post
Enable Keep-Alive to Speed up Your Site
Disable Server Signature by Editing .htaccess/Apache