Make your ecommerce website fast and improve site performance - Yottaa
05/19/2017

Going to IRCE?

If so, meet with Yottaa at booth #636 to find out how you can improve your website performance by up to 60% and increase online conversions up to 20%.

We can even schedule a free onsite performance assessment for you at IRCE to see how your site stacks up against the fastest loading eCommerce sites.

Click the button to schedule your free performance assessment at IRCE.

Schedule Free Assessment

The Yottaa Ecommerce Blog

Your website is slow, and you’re wondering why.  Poor-performing JavaScript could be the problem. Here’s how to find out if it’s what’s ailing you – and your site visitors!

JavaScript is the reason we’re able to collect information on our website visitors, engage visitors through social media, and offer dynamic web experiences instead of plain old text and images. Unfortunately it’s also one reason webpages rarely load as fast as visitors expect them to.  

The spread of JavaScript on web pages is directly linked to an explosion in the weight of web content. Today the average webpage is 13 times heavier than it was in 2002, and nearly 20% of that average page is composed of JavaScript. The language offers the ability to collect important info and provide an engaging user experience, but is too often implemented with little regard for performance cost. Since it?s a major cause of performance issues, we consider JavaScript to be one of the best places to start when looking for ways to speed up your site. 

How Do I Know if JavaScript is a Problem?

To find out if JavaScript is slowing down your site, run a performance test at WebsiteTest.com.  Just plug in the URL for your home page and hit “Test” – that simple!  You can also run separate tests for any other highly trafficked (or otherwise important) pages, such as a catalog page on an eCommerce site.  The results will tell you a lot about your website – including information on each of the JavaScript files on your page. 

What to Look for in Test Results

The simplest stats to look for are the total weight and number of JavaScript.  Look to the “Content Complexity” section of the results summary page for these stats.  In general, any additional weight (meaning: more bytes, bigger files) adds to the page load time, and likewise additional assets add time ? even if they?re really lightweight (meaning: less bytes, smaller files). A round trip to the server takes time even if the file it fetches is 0 bytes.  Basically, when it comes to JavaScript files, the lighter – and fewer – the better.

 

Why Your Website Is Slow

 

Update 8/3/2015: The use of Javascript has continued to grow enormously in the past two years, so we’ve adjusted the figures here to reflect more current web averages.

Some context: across the web, the median number of JavaScript on a page is 8 21, and the median weight of those files is 111 352 kB.

    • If your site’s JavaScript totals are around the median, you will absolutely benefit from JavaScript optimization, but there could be other bottlenecks doing more to slow down your site.
    • If your numbers are higher than the median, optimizing JavaScript should be a priority.  It?s probably slowing down your site considerably.
    • If have 25 45 or more JavaScript files (or 408 600 kb or greater weight) you’re in the dubious company of the bottom 10 percent of all sites on the web for JavaScript.  If this is the case, optimizing your JS will vastly improve your page load time

A Deeper Dive: Reading the Waterfall Chart
Beyond the aggregate statistics, it’s worth taking the time to look at the waterfall chart in your WebsiteTest.com results page.  The waterfall is a timeline of the page?s load process, and provides insight down to the individual asset (in this case, the individual JavaScript file). 

Looking at the waterfall, click the column header “Type” and choose JavaScript from the dropdown menu.  This will isolate JavaScript files from the rest of the files on that page.  (If “x-JavaScript” files exist on the page, you’ll have to look at these files also in order to get a complete view; x-JavaScript is an obsolete header call but is still fairly common.)

 

Why Your Website Is Slow
Among the files in the waterfall, look for any that stick out with a long time to load.  Most JavaScript files load in less than 100 milliseconds.  Any more 200 ms load time (see below) is a major red flag.  If you find a slow JavaScript file that is hosted on your site (rather than from a third party) then you can take steps to compress and minify the script to make it load faster. 

 

Why Your Website Is Slow
Another trait to look for is what we call a “chatty” asset.  That means for one widget or other piece of content, several assets must fire off in a row to load it.  That?s simply inefficient and if possible, you should find a different version of whatever widget is chatting too much.

 

Why Your Website Is Slow

 

Does Optimizing JavaScript Performance Really Work?

Yes, JavaScript optimization works. A lot has been written about it around the web. Beyond that, we created an experiment to isolate JavaScript optimization from the many other content optimization techniques.  We found we could shave a site’s load time down by 33% with just JavaScript concatenation and minification – that’s 1/3 improvement on top of all the other techniques for images, HTML and others.  

 

Why Your Website Is Slow

Special Note Regarding Third Party JavaScript

A JavaScript served by a third party is a horse of a different color.  Third party scripts are some of the worst performance offenders. We’ve written specifically on the 12 worst JavaScript offenders and how Facebook took down the web with its JS files.  These issues are largely separate from the issues we’ve identified above – they have to do with the reliability of the delivery of the asset.

The root of the problem with third party scripts is that web performance issues from the originating site can spill onto your site through the script.  Particularly problematic are scripts that load synchronously, which means they might include a blocking behavior as they execute and hold up other assets on your site until it’s done.  If that script happens to have an issue with its delivery, a large portion of your site could be waiting for seconds and seconds, waiting for one script to finish.  Making sure your third party scripts load asynchronously is a good way to prevent the blocking behavior.  Even more effective: simply be judicious about which third-party scripts you allow on your site.  


Yottaa’s web performance optimization software automatically optimizes the JavaScript on your site, as well as other critical elements of performance optimization. 



Yottaa Ebook 17 Performance Metrics You Should Care About Download

 

 

 

Let's enhance your user experience

Fill out the form below to find out how Yottaa can benefit your organization.