Hi, today I ran a website grader for my blog, and it is in this moment that I arrived to this article after learning a few things that improved (this blog that you are reading) loading time.
Clicking on the “Show how to fix” link will expand the view and show you the list of script resources that should be evaluated.
Choose Best Method.
Once you’ve identified which scripts need to be moved it is time to decide “how” to fix them. There are two main methods to choose from. The first is to make the scripts inlined; in this method the contents of the script are added directly into the HTML of the page and are only loaded once they are needed. This is the best option if the script is small and applies to a single page.
Decide Where to Move It.
The body HTML is where you have all of the content for your pages. The best way to find it is to find where you have all of the copy for your content. If you are using WordPress, the script can be added directly to the page by typing it alongside your content via the “Text” view.
Where you move the script will depend on if the script needs to occur at a certain point of the page or if it can wait until the end of the page rendering. The first should go in the body HTML or Custom HTML module while the latter can go into the Footer section.
Move the Script
This next step is pretty simple; add the script to your desired location:
This is one of the most important steps in this process.
After making all the changes check the previews to make sure that the site still works. Does the page load correctly? Are all elements showing properly? If there is something broken, or not loading properly, then you should troubleshoot the problem. This can be done with the help of many differentdeveloper tools; try a few out and then choose your favorites. Once you find the errors, double check your code and verify that you are not missing any important components such as semicolons or curly braces.
Once you have confirmed there are no issues with the page after the changes are applied, you are then ready to publish.
To take this premise even further, regularly testing the speed of client websites is something which should be a common occurrence in any web development schedule. With the ever evolving world of online marketing staying ahead of any potential issues is critical to success.
This article first appeared on hubspot and i came across it after analyzing and fixing this blog.
Latest posts by Peter Kivuti (see all)
- How to tell if your computer has been tampered with - July 21, 2019
- Facebook’s Libra Is Already dominating other crypto-currencies! - July 21, 2019
- Understanding Facebook Libra Crypto-currency. - July 18, 2019