Minimizing Round Trip Times – RTT

It’s time for another post to help your site load faster. My last post, Suggested Methods by Google for Speeding Up Your Website, finished off with caching. The next step to take for speeding up your website is to minimize round trip times, RTT.

RTT refers to all the requests required when a user accesses your website. This is not a size of file issue, but a number of requests issue. For example, my home page currently has 24 resources that need to be requested and transferred. The less the site has, the faster the transfer.

What Are These Resources?

So the first question you might ask is what are these 24 resources Best Web Image needs to load? They are the images, the page itself, its favorite icon, and the CSS file. Anything that needs to be download, needs a request, and it starts with the page itself. An obvious first step to reduce the RTT time is to simply reduce the number of resources. A quick example of this would be delete my logo. Then I would have just 23 requests.

How to Speed it Up?

Trying to reduce your RTT by improving DNS info might be a bit complicated at first, and possibly out of your control. However, we can easily control our redirects. The first easy way to do this is by making the personal rule to never link to content that is redirected. Link straight to the actual source.  Here is a common mistake:

A link to here: http://www.bestwebimage.com/archives/tag/speed

is a redirect to here: http://www.bestwebimage.com/archives/tag/speed/

Notice the slash at the end? Avoid the redirect, and link to the browsers final resting place. In this case the link with the slash at the end.

Avoid HTML meta or javascript to redirect. Do it server side issuing 301’s or 302’s redirects is the fastest way to do this. Also, 301’s and 302’s can be cached by the browser, another speed improvement.

Pack all your javascript into just one file if you can. Having separate files for your javascript is a great idea to improve downloading speeds, but if you have ten different javascript files, you may be defeating the purpose. Pack them all into one. Caching will work great and RTT will drastically improve. This goes for CSS content as well!

The last step to minimize RTT is to consider parallel downloads. If you have javascript files being downloaded know that javascript likes to work alone. If your site request more than one JS file, it won’t start the second until the first file is downloaded. JS files can be downloaded with other items, like your CSS file so try to group things in a logical way.

Another method to parallel downloads is to access the content from another server. This will help you get over the common browser limitations of two requests per server.

Usability Score!

My final comment here is that when thinking about RTT, you could be actually scoring one for usability. Let me ask this. How many images are on your site right now that could easily be in text format (a suggested web usability method)? For every image that does, it is +1 to the RTT.

11 Comments

Add a Comment

Your email address will not be published. Required fields are marked *