dead.letter

A technical blog focusing on Linux, FreeBSD, DNS, security and virtualization.

2008-04-02

Improving website performance

Here is an email I sent to one of our clients today. The advice is relevant to most anyone who runs a website... especially a dynamic one.

I mentioned a few weeks back about checking your content for cache-control headers before going with cdn (content delivery network). I have taken a closer look at it this morning and have some recommendations to improve performance for your web site.

First, try visit http://www.ircache.net/cgi-bin/cacheability.py and enter some of the URLs from your site. You will notice that most of your content is delivered without cache-control or expires headers. This is bad.

The reason it is bad is that the browsers must come back to you again and again for all the content. If you used cache-control headers effectively, the content could be stored in intermediate caches or better still in the user's browser cache.

Although some of your content is cacheable based on Last-Modified headers, this is less than optimal because the browser must still issue an 'If-Modified-Since' request, which may produce a 304 (Not-Modified). So there still must be an http request for each object of this type.

Leveraging cache-control pays extra dividends, because not only do you increase perceived performance client-side by decreasing page-load times, you also see the benefits on the server-side in a decreased load. So it mitigates the need to scale out.

It is for this reason I highly recommend you consider this valid cause for further investigation and improve that application to make your content cache-friendly.

Here is a great introduction to how web caches work.
http://www.mnot.net/cache_docs/

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home