Archives For speed

I StumbledUpon this tutorial on improving the load speed of your Web site. One interesting thing about this discussion is it starts with the DNS and how that factors into the speed: something I hadn’t considered. The tutorial also points out that download speeds have increased so much that it may be better to download fewer, larger resources (like all the CSS or JavaScript in one file) than more, smaller resources. Again, this is something I hadn’t thought about—I was still going with the old thinking of taking extra steps so that the user doesn’t have to download one iota of code more than they have to. The tutorial then goes into caching and compression, something I discuss in [intlink id=”167″ type=”post”]my series about applying YSlow![/intlink] to a site.

The tutorial goes on to talk about organizing HTML files: CSS at the top and JavaScript at the bottom. I’ve heard this before (about putting JavaScript right before the closing tag) but haven’t gotten around to testing it myself. It makes sense, though, as the browser doesn’t need the JavaScript to render the output for the user to see, and because the JavaScript code itself probably can’t do its thing until the HTML has loaded. If you keep reading, you’ll learn how to use CSS image sprites to minimize the number of images that have to be downloaded by the browser. My Web site has practically no images, so I haven’t used this myself, but it’s something that can dramatically improve the performance of a site.