Home      Updates      RSS Feed      About      Code      Contact

  gzip even more things! August  1 2011  8:48 AM EST

I've been working on getting the access time lower. The first thing I looked into was how to actually get the browser to cache stuff. I found out I wanted the "Cache-control" header, specifically the "max-age" property. So, I modified dsrv to add an expiry time to everything. Because I really don't know what I'm doing, almost everything just defaults to one minute. There are a few things, such as individual updates and the about page which gets theirs set to an hour.

The second thing I got working is to be able to gzip the stream ourselves. Instead of relying on prebuilt .gz files, we now look at what the client supports. If they say they can accept gzip, we take what we would have output and run it through the deflate algorithm set up to produce gzip files. Then, we send that over instead of the decompressed stream. Even doing this for each request it appears to reduce the time required to obtain a page. For instance, we transfer 11KiB less on the RSS feed , but it still only takes 5 milliseconds server side for the code generating it (including gzipping) to complete. The major slowdown is still the initial talking, not the downloading, however. Perhaps I can look into that another day :D

 

My name is Jeff Chapman; You can reach me at: [email protected]