Web Page Load Performance Factors

While I've always aimed at making my pages load as fast as possible, I recently read that Google's PageRank (TM) algorithm has started to take page load performance into account - yet another good reason to optimize page load times. I've done a lot of research and testing in this area, so I've decided to write up a blog post about it.

Web Page Performance Factors

Dynamic versus Static

The difference between dynamic and static web page generation is significant. Not only in terms of page load time, but server load as well. One page may render and load quickly, but what about ten pages getting rendered and loaded concurrently? This is sometimes referred to as getting "Slashdotted", but it can be caused by a variety of factors ranging from too much popularity, a deliberate and malicious denial of service attack, to a poorly programmed spider bot crawling out of control.

Whatever the reason, steps can be taken to temporarily cache dynamic content so it doesn't have to be rendered every time a request is made. I won't go into the gory details in this post, as caching is a very complex and tricky thing to master... maybe a topic for a follow-up post?

Nevertheless, while I still use some dynamically generated content, I have mostly switched to static content and I haven't looked back. In fact, that was the main reason why I switched from Wordpress to Movable Type Open Source!

Compression

Compression helps with network performance and responsiveness - especially for large HTML, Javascript, and CSS files over slow connections. However, some older browsers can't handle compression - something to be aware of. Also, like dynamic rendering, most web servers have to compress content for every request! This does require extra CPU cycles and memory, but so far I haven't run into any problems due to that. Thankfully, if and when I do, the web server I use for handling client connections and static file delivery, NGINX, has the ability to server pre-compressed files!

Also, note that it is not necessary to compress images - web formats (png, jpg, gif) are already compressed!

Caching

OK, I can't have a post about page load performance without talking about caching! Still, I'm going to limit the scope of focus to heavy and light files.

The general rule of thumb I use for caching is cache HTML page URLs lightly, meaning for short periods of times. I never want to change my URLs for HTML resources, and I definitely will end up changing them, and I don't want excessive caching to prevent clients from viewing those updates.

I always cache large objects like images very heavily. If I need to edit the image, I change its name, and reference the new URL.

That's basically it! There is a lot more to it, actually, especially when I take proxies into consideration, but as I mentioned earlier - that could be its own blog post!

Testing and Monitoring Resources

Google Webmaster Tools

Google Webmaster Tools is a resource for people "in control" of a domain - meaning they have the ability to upload a file to the top-level (root) directory of a web address. There are other methods of validation, including setup of a DNS record or a meta tag, but I prefer the file validation method. There are a bunch of tools available, but I'm only going to focus on the Labs -> Site Performance feature.

The Site Performance page displays a graph of low accuracy depicting site performance. I have to believe that the data is low accuracy, because for my sites, the data is all over the place. One day is super fast - faster than 80% of all sites - the next - slower than 97% of all sites.

I read into how the graphs are calculated, and it seems that they are using visitor data, not Googlebot data. And not all visitor data, only data from visitors who have the Google toolbar installed with the Pagerank functionality enabled! So yes, I would have to concur that the graphs are not a valid sample pool.

I certainly hope this is not the performance measurement they are including in PageRank calculations!!

Firefox Page Speed

A more precise way to evaluate page performance is with the "Page Speed" extension for Firefox.

Firefox Page Speed

By Albert on July 10, 2010 9:20 AM

Categories: