area image

Why so Slow?

With websites becoming more and more complex and the rise of mobile web access (with its often slower connections), it may appear that The Web is slowing down. The issue of website speed is complex but let's have a look at some of the factors that might make your site slow.

Anatomy of a web request

When you go to a web page (say, you are sending a "request" to a web server asking for (usually) some HTML content. The server puts the HTML response together and sends it back to your browser. This process is usually very quick, even for sites that are "slow". The problem is that this initial request is just the beginning. Within the HTML response will be numerous (sometimes hundreds) of instructions to send more requests to the same web server or maybe other servers.

These requests for additional "assets" are what is making your site slow!

Types of "assets"

First, lets explore what we mean by additional "assets". There are many different types of assets used in a web page.

  • Styles (CSS)
  • Scripts (Javascript)
  • Images
  • Data (JSON, XML)
  • Fonts
  • Other Media: video, audio
  • Social Media
  • Communications (analytics, doubleclick)

Size of "assets"

Many of these "assets" are relatively small (only a few hundred bytes). But some are (relatively) large. Images, videos, and fonts are usually the assets that are the largest.

Number of "assets"

Even if the assets are small, if you request a few hundred of them, they add up. Each time you send a request to a server, there is some overhead. The browser has to lookup the location associated with each uniquely requested domain, establish a connection with the server, send the request and wait while the server processes the request.

However, a real time killer can be in limitations the browser has on the number of simultaneous connections it has to a server. For example, Chrome only allows six (6) conncurrent requests to a server. So, if your page has 60 images on it, Chrome only requests six at a time, waiting until one completes before making another request. It may only take 250ms to retrieve an image but the browser will have to make 10 (60/6) sets of request (or 2.5 seconds total). This does not sound like a long time but it adds up.

How to tell what is going on in your website.