Tuesday, September 22, 2009

Optimizing Page Speed

In between other projects at Arcane Journeys, I spend some time thinking and learning about how to make the whole site run faster. One reason I do this is because I have a tiny shared server, and want to get the most out of it that I can. This is an overview of what I've done, with some interesting links to learn more.

One tool which was invaluable to me was Page Speed, a Firebug/FireFox add-on which analyzes your a page of a website and gives specific things you can do to make it faster. Some of what I did after running Page Speed was optimized some of my jpeg images, removed some unused CSS from my templates, as well as learn about some uses of CSS that are less efficient than others. other things I knew already, but had missed some instances, such as always setting the height and width of images in HTML, so the browser doesn't have to resize them on the fly.

Since Arcane Journeys is mostly written in ASP, I looked at sites like ASPFaq.com, 4GuysFromRolla.com and Microsoft. I learned about disabling the session state on pages that don't need session variables, to use 'option explicit' on every page, as well as that concatenating strings (by using the & operator) in loops, especially with lots of text, is very slow.

I'm sure there is always more to learn, and some of the ideas I ran across I couldn't put into practice due to the shared server, but I really feel like the changes helped to make the site faster, and they made me feel way better and smarter about things too.