Page load time with CDN – Content Delivery networks

CDNs or Content Delivery Networks (https://en.wikipedia.org/wiki/Content_delivery_network) are basically additional Computers distributed across the planet APART FROM the WEB SERVER to serve STATIC CONTENT.

 

This Video will make it much more clear :

 

I am currently using a Godaddy Premium Hosting and am fairly satisfied with it (after you get over the feeling of ‘got ripped off’, the advantages become obvious).

But there are times (during the day / festive season, etc) when your website seems too slow. Images takes ages to load, etc.

 

This is never a good thing. never was. Here is an article written 22 years ago on Website speed + experience : http://www.nngroup.com/articles/response-times-3-important-limits/

 

The basic advice regarding response times has been about the same for thirty years [Miller 1968; Card et al. 1991]:

  • 0.1 second is about the limit for having the user feel that the system is reacting instantaneously, meaning that no special feedback is necessary except to display the result.
  • 1.0 second is about the limit for the user’s flow of thought to stay uninterrupted, even though the user will notice the delay. Normally, no special feedback is necessary during delays of more than 0.1 but less than 1.0 second, but the user does lose the feeling of operating directly on the data.
  • 10 seconds is about the limit for keeping the user’s attention focused on the dialogue. For longer delays, users will want to perform other tasks while waiting for the computer to finish, so they should be given feedback indicating when the computer expects to be done. Feedback during the delay is especially important if the response time is likely to be highly variable, since users will then not know what to expect.

 

Even two decades ago when WWW was in its infancy, the page load time was a major part of the User Experience.

In 2015, how can we afford to ignore it ?

 

In a nutshell, page load time depends on two things –

 

1. The response time of the server.

2. The number of requests made to-and-fro between the client and the server.

 

All other factors like page size, etc. are IGNORED for now, because even if you have a 1000MBPS connection (like https://fiber.google.com/about/ ) you WILL experience delay (or to be precise, latency – https://en.wikipedia.org/wiki/Latency_%28engineering%29 ).

 

For the first issue (server response time), we now have SSD Servers. They are great for reducing the response time. But a major problem with even SSD servers is the latency delay they fail to address when serving to other continents.

 

For the second issue, lets understand it as follows : if we have to make 100 trips between our kitchen and bedroom, or a single trip between your home to your neighbour, what will you choose ?

Here the analogy depicts close to zero latency times (means physically closer to the server) when referring to the distance between kitchen-bedroom and medium-to-large latency times (means physically far away) when referring to your home-neighbour’s home.

Hence the use of too many CSS + JS + IMAGE requests from webpage + widgets +analytics etc. will invariably result in higher page load time.

 

This is where a CDN comes in. Its worldwide presence of Data Centers ENSURE a lower latency and choosing to serve only STATIC content is useful to dramatically reduce the response time of the server.

Is your website fast enough ?

lets find out.

Head over to https://developers.google.com/speed/pagespeed/insights/ and enter the URL of your Website. The results are quite consistent and comprehensive in my opinion. Various terms and optimizations are explained well too.

If you are a maniac and want to know every damn detail about your website, head over to http://www.gtmatrix.com and enter your URL. The results are the most comprehensive I know. But those fine details matter after you are done with the basics.

 

 

The Basics (to reduce the number of requests)

– Minify HTML, CSS and JS.

– combine various CSS into one. same with JS.

– try to serve Images according to the resolution of the device.

 

Use a CDN after you have done with the above optimizations.