2009-10-09

Reducing website bandwidth usage

There are lots of excellent tools to help web developers optimise their websites.

Here are two simple things you have no excuse for overlooking on your next project.

HTML, XML, Javascript and CSS files

One of the easiest ways to speed up a website (often to a surprising degree) is to turn on compression of plaintext content through facilities like mod_deflate or the Gzip Module.

Here's the Apache configuration file I normally use:
AddOutputFilterByType DEFLATE text/html text/plain text/css text/javascript text/xml application/x-javascript application/javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch "MSIE 6" no-gzip dont-vary
BrowserMatch ^Mozilla/4\.0[678] no-gzip

Images

As far as images go, the following tools will reduce file sizes through lossless compression (i.e. with no visual changes at all):
  • gifsicle -O2 -b image.gif
  • jpegoptim -p --strip-all image.jpg
  • optipng -o7 -q image.png
(An alternative to optipng is pngcrush.)

Note that the --strip-all argument to jpegoptim will remove any EXIF/comments tags that may be present.

2009-10-02

Keeping track of what others are saying about your project

There are a few ways to easily keep track of what others are saying about your Free Software project. In a very popular project, you may already have enough feedback from its busy forum or mailing list, but in new and small projects, you often have to actively seek feedback/comments from end-users.

Here are a few ways to find out what people are saying online about your project.

RSS Feeds

First of all, here are the RSS feeds I subscribe to for one of my projects (safe-rm):

Google Alerts

I have also signed up for the following Google Alert:
Search terms:link:safe-rm.org.nz
Type:Comprehensive
Deliver to:Email
How often:as-it-happens
which emails me anytime someone links to my project's homepage in one of the resources indexed by Google.

Backtype Alerts

Finally, these Backtype Alerts notify me anytime safe-rm features in a blog comment:
  • safe-rm
  • safe-rm.org.nz


Anything else I should subscribe to or follow?