Arthur Kay

aKa Web Design – Now with Turbo!

Last night at the Sencha Chicago User Group, I gave a presentation titled AJAX Communication in Sencha Touch and ExtJS. The premise of the talk was that all websites (and web applications) should be optimized to be as fast as possible.

During the talk, I kept harping on the fact that browsers are limited to the number of HTTP requests they can make per domain. This isn’t anything new… lots of people have talked about this before. But I realized that I wasn’t practicing what I preached – my own website didn’t utilize the idea of subdomains for requesting JS, CSS, or other file types.

I took some time late last night to create a series of subdomains – js.akawebdesign.com, css.akawebdesign.com, and img.akawebdesign.com.

The key is that they all point to the same directory on the server. I didn’t move the files around the filesystem, mainly because I’m lazy. The process I’ve put in place simply fools the browser into thinking the files are in some other domain… which opens up the number of HTTP requests available. DNS saves the day!

The result is that I’ve managed to shave about 1/4 of a second off the loading time for my website! See the screenshots below:

Before: 1.66s

After: 1.36s

Was it worth it?

1/4 of a second may not seem like a lot, but for larger websites or applications that number might be dramatically more effective.

The caveat here is that those numbers I showed above depend on a lot of things. Caching, network speed, website traffic… any of those could effect the speed my visitors experience at any given moment.

But overall, it’s an improvement. Faster is always better than slower.

Be Sociable, Share!
    This entry was posted in AJAX, Web Development. Bookmark the permalink.

    Leave a Reply

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

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>