Improve Your Page Speed: Externalise Your Javascript
Faster page speed = better conversions. Time to clean up your code?
The question that many of us have been asking is, “Can reducing the load time of your web pages really improve your sales conversion?” Now we have evidence to suggest that this could be the case and if your pages are slow to load, you may want to consider cleaning up your code once and for all.
Let’s look at the figures…
Akamai and Gomez.com found in their comprehensive survey that almost 50% of all web users expect a site to load in 2 seconds or less. Even more enlightening, this 50% say that they are very likely to leave a site if it doesn’t load within 3 seconds.
A huge 79% of online shoppers will not return to an e-commerce site if they experience poor web performance. 44% of shoppers are likely to tell a friend about a poor online shopping experience.
Page speed and Google
Google hates slow websites and it seems that it’s one of their biggest missions to conquer the problem of sluggish load speed. The new version of Google Analytics (currently in Beta mode) offers a great new way to measure site performance and site speed, allowing online businesses to clean up their act in problem areas.
Not only does a slow loading landing page impact negatively on your sales conversion rate, but it can also affect your website rankings in Google. The new Site Speed report in Google Analytics will look at the following areas:
• Slow landing pages
• The corresponance between traffic sources and page speed
• The correlation between geographical location and load time
• Load time for different browers
The above information can help you establish exactly where you are facing the biggest problems with site performance. Having this information is key to improving yoru website coding.
Make Javascript and CSS External
Javascript and CSS can be placed on your web pages or they can be contained in an external file. By using external files, you can expect a much faster load speed because the files are cached by the browser; whereas internal HTML coding increases the number of HTTP requests because the HTML documents need to be downloaded everytime the HTML document is requested.
There are certain metrics that could argue that one way or the other is the best method for deploying Javascript and CSS. But most sites will see a huge benefit from using external files.
Watch this YouTube video on how to put Javascript on an external file:
Sources: Gomez.com and Akamai.com