zlog 2.

online web periodical.

path: home / archives / 2003 / 12 / 23 / cashmoi

Cash Moi
> written 23/12/03. no comments.

Safari, Apple's very own little browser is not perfect. In fact it is quite some way off being perfect. Regular crashes, connection time outs and lame tab support aside, Safari has one major problem and that is with caching (update: this seems to have been fixed with 10.3.2 but as the rest of the post is still relevant...). Now caching is an ancient, lost and forgotten art. Many people have harked on about the importance of caching but I feel it needs to be said again. Caching in its simplest form (when taken in a file retrieval context) works like so; a user requests a file from a server. The user's client checks for a local copy of the file and then does one of two things, either finds it and displays it or doesn't find it and goes and collects it from the server. Now this is where it gets a little more tricky. What if it does find a copy of the file locally but the remote file has been updated? Well the client must allow for this with one of the following methods.

  1. The browser can check the freshness of the file it is requesting. This only applies when the server has stated that the file will be "fresh" for so many days, weeks or months via its expire time.
  2. If the file is not considered fresh the browser can ask the server to validate the file. This means that the server replies with a yes the file is still fresh or a no please come and retrieve it again.
Hold up a minute. Why on earth would you want to cache the file in the first place? We all have broadband these days don't we? Well caching has two major benefits (one for each, the client and the server). The client saves bandwidth and time as serving the file off the hard drive means that it doesn't have to traipse all over the internet to retrieve the file, plus it takes a shorter amount of time. This has the effect of making the sever appear more responsive. The server gains because it too saves bandwidth and bandwidth ultimately equals money. Side-stepping the fact that servers also benefit by caching the output of scripts with a large overhead and you have a benefit for both sides of the handshake. So why am I bringing this up now? Good question. This month has seen the greatest amount of zlog's bandwidth usage. Ever. A lot of the used bandwidth has been wasted. This is my fault as I hadn't set caching for the images from last months post, "Panther". I've learnt my lesson now. Honest.

comments

add a comment

all html tags will be stripped.