« My life as a syndicated blogger | Main | Symptoms of a lasting problem »

I like good grades

After I spent a chunk of yesterday figuring out how to make some work sites load significantly faster (think “twice as fast”) without a few little configuration changes, I thought I should apply the same process here. I ran YSlow on this site, and started with a grade of 68, a D. Unacceptable.

Unfortunately, since I don’t own the server this site runs on (yet) I don’t have total control over its configuration. For example, I can’t figure out how to ensure that the site stylesheet (all 2KB of it) get compressed before it’s sent to your browser. (This would be worth doing because the time it takes to Gzip a CSS file is more than reclaimed in the time saved downloading a notably smaller file.) However, I was able to add these three lines to the configuration:

FileETag none    

ExpiresActive On    
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 1 year"

This means that the two files you do download along with the front page (the stylesheet and the image) will stay in your browser cache as long as you let them, or one year, whichever is shorter, which means you won’t need to request them every time you visit this page. Not a big deal for one visit, but over time, it adds up. And you’re coming back, right?

What really got me was a number of little JavaScript inclusions I added years ago in the name of boosting traffic, such as a Technorati widget which, on closer examination, I discovered isn’t even current. Dropping those took a number of relatively slow-loading scripts off the download list for the front page.

The result of this is that, even though fewer people are coming here, the pages will load more quickly for those who still are. And, probably more important to me, my grade is now an A (94). Which we all know stands for Acceptable.

Now Playing: Merry-Go-Round from All Shook Down by The Replacements

Technorati Tags: , , , , ,

Post a comment