post

CDNs and how they improve the speed of page loads

If you look at any resource that discusses performance of websites, or you view the suggestions from a tool that assesses website performance, the use of a CDN or Content Delivery Network, is always on the list (and usually right at the top).

We’ve mentioned in previous blog posts related to our zeckoShop releases that we are always looking to improve performance from the backend to the frontend and we’d like to share with you one way we’ve done this, which is our usage of CDNs to serve up the assets from our websites (assets are files such as images, scripts etc).

So why is this such a great thing? Let’s outline the benefits of using CDNs and it’ll be obvious how this will improve page load speeds so dramatically.

Multiple Domains – More File Downloads

Browsers will only download a certain number of files at a time from a single domain, or web address.

CDNs also have their own domain, different from your website, meaning that the browser can download files from your website and files from the CDN at the same time, thus cutting down the overall download time when loading a page.

We’ve taken this one step further by utilising three CDNs, one each for:

  1. Images
  2. zeckoShop specific assets
  3. Third party assets

It’s fair to say this has had a dramatic effect on performance.  

Pre Caching of Files – Less File Downloads

When users browse sites on the Internet that utilise a CDN, those files are then cached in the browser. When they then visit your site, and it uses any of these third party files, the browser won’t need to download it again and will used the cached copy instead.

The third party files we use are for very popular frameworks and the CDN that serves them is one of the most popular available so there’s a really good chance as users visit the homepage of your site for the first time, or the first time in a long time, some of the larger files are already cached in the browser and don’t need to be downloaded again.

Distributed Servers – 100% Availability

When using a CDN to serve files there are two worries most people have:

  • What if it’s actually slower since files are being served from somewhere in the world that might be far from where the user is browsing a website, and
  • What if the CDN goes down and can’t serve files, thus rendering my website useless

The CDNs we use actually has multiple servers all around the world and when serving files will do so from the best and closest server to the user browsing your site. Also, since CDNs are optimised to deliver assets and because of the previous two points, it’s actually faster than serving the files locally.

And, because of the distributed servers, if one of them goes down for a period of time, the others are still up and available to serve your sites assets 24/7.

Think of it like automatic load balancing and redundancy for your assets, built right in without having to worry about high costs and complex setup.  

DDoS Protection – Uptime Guarantee

Distributed Denial of Service, or DDoS attacks are on the rise and impacting website uptime every day.

Protection against these kinds of attacks is incredibly difficult and is an ongoing concern requiring constant monitoring and staying ahead of the attackers.

CDNs are built to withstand these kinds of attack and even when one is attempted will keep serving files to you without affecting your uptime.

Optimised Images – Decreased File Sizes

Another way we go one step further then most other platforms and services is that your images are heavily optimised when using our platform.

Whether a user is browsing on mobile, using Chrome vs Firefox, the images served are optimised for that device or browser.

We’ve found through our testing that the image optimisation can decrease file sizes by up to 80-90% which is an incredible savings in file size and in turn a huge boost to performance.

On by Default! – Cost Savings

This is one of our favourites.

If you are using another platform for your ecommerce site, or have your website hosted elsewhere, to utilise a CDN would require someone make changes to your backend to support the use of a CDN and on top of that you’d also need to pay an additional fee for the storage and bandwidth associated with the CDN.

We like to make things easy for our clients and prefer to handle all the heavy lifting and details of their website so not only have we built in full support for all of this into our latest version of zeckoShop, we’ve also built the price into the ongoing hosting costs of the website.

What can we say, it’s fun saving money and time for our clients while improving their online presence.