No talk about your Site's speed can realistically happen without talking about latency. We all are glad to live in an era of always improving bandwidths (3G, 4G, 5G and so on). But latency can make your site crawl even on these networks. To understand why, let us first try to understand latency minus any technology jargon. While talking about Pizzas!
Let's say you order a Pizza for delivery from a nearby restaurant. In this analogy, latency is the distance between the restaurant and you. It determines how long the delivery boy will take to deliver you the Pizza. And bandwidth is the number of Pizzas the delivery boy can deliver to you in a single trip. Now, hold on to this analogy for a second as we derive two important traits:
Above traits tell us that the improving bandwidth of networks around the world will not fix the Site slowness issues that exist due to high latency. Latency is born out of distance between your Website Server and your Visitor's device. And the time your content requires to travel a given distance cannot be reduced. It is governed by the laws of physics.
In a Pizza world, Latency is the distance between the Pizza restaurant and you. And Bandwidth is the humber of Pizzas the delivery van can deliver to you in a single trip.
Latency has second important trait that makes it the Silent Speed killer: Increasing latency has a multiplying effect on the over-all increase in time.
Let's return to our Pizza world to understand what that means. But with a few additional conditions added to our analogy. Let's assume our Pizza restaurant doesn't offer delivery service. And let's assume the Pizza is for your wife who's feeling too lazy to venture out herself. This means you'll have to make two round-trips to the restaurant to get the Pizza. First trip to get the menu to decide what to order and second to actually get the Pizza.
When you access a web-page on the Internet, it is very similar to first getting the menu (HTML file) delivered and then getting the Pizzas (the image, CSS, JS, font and other files) delivered. Some of these second-trip files request further files causing a third-trip. And so on. When your web-pages require a lot of round-trips to load, even a small increase in latency balloons into noticable increase in total time.
When your web-pages require a lot of round-trips, even a small increase in latency balloons into noticable increase in total time.
As a result, when you try to understand how fast your website appears to your visitors, it is important to answer:
Answering the above questions will help you determine if latency is killing your Site speed. And if it is, you can evaluate one or more of the below choices to improve your Site speed:
Given very little cost and effort involved in using a CDN, you should definitely leverage it. But the other two options may require a lot of planning and effort. As a result, you should measure and analyze the impact of latency for your site to make a data-driven choice.
With the right optimizations in place, we can cater to our visitors coming from slower networks and devices. We understand all that. But how about if we can see how these optimizations make a site's loading experience look like. In this post, we'll do that by seeing how the homepage for three leading Indian travel aggregator sites load up. On a fast and a slow network. The goal is to feel the impact of optimizations. Especially on slower devices and networks....continue reading