Performance Settings

Top  Previous  Next

This is a pretty complicated topic to explain quickly, but as an engineer I just feel the need.

Partly because I spent a lot of time on it, and partly because it's just really, really important!

One of the best ways to affect a visitors perception of the performance of a web-site is to control how the client browser caches content.

By providing cache directives, we indicate to the browser that we regard our content as "important" and in the limited space afforded to cache, we request that we get preferential treatment relative to other sites being visited. In short we provide content expiry headers - a best practise that very few sites properly follow.

As with other things we've done, we've tried to make this really simple, reducing something one could "write a book on" to a single configuration item as shown below.

When users select a "Performance Setting", we automatically generate multiple directives behind the scenes that instruct the browser behind the scenes about how to cache content. (read on for details)

The single setting under "System Setup" / "Preferences" / "Utilities" is shown below.

clip0634

We think three days as a default cache retention period is pretty reasonable, but the longer you set this value, the faster users will perceive your web-site to be. (most of the time anyway :-) - not time to get into it here.

The design of NeatClubs is unfortunately such that you need to set this value at least once and save it before the cache control takes effect. When you save a setting we write configuration files in a number of key directories behind the scenes.

To illustrate how important this is, below is a profile of the NeatClubs.COM web-site generated using Yahoo's free utility "YSlow". Note that on a "cold cache" the "weight" of the site is ~ 1.4 MB. It's not as bad as it sounds because most of the content is being loaded asynchronously by a dynamic banner slider, so the site renders relatively fast - it is still heavy though, with over 200K of Javascript, some of which is being delivered from a content delivery network (at Google) for added performance.

Note that after enabling this capability the chart on the "right" applies (see below) - we reduce the number of requests to the server by a factor of "10" and the "weight" is reduced literally 100 times.

This is just really impressive and this is why this is worth paying attention to!

clip0635

There are lots of other steps we can take to improve performance, but they tend to involve spending some money, and so far our customers have not been really excited about doing this. ;-)

In addition to compressing content automatically via an apache module, NeatClubs.COM now also dynamically provides instructions to the client in an effort to reduce the amount of data loaded.

For the techies reading this, below is an example of one of about a half-dozen .htaccess files written to various server directories.

If you're wondering "A259200" is instructing the browser cache to age out content of a particular type after "3 days" ( 3  days * 24 hours per day * 3600 seconds per hour is where 259200 comes from)

clip0633