So last week was an interesting one, memetically: a link from Instapundit to the Kerry Daisy, and an April Fools’ barrage of links to the March for Web Standards, spawned from A Whole Lotta Nothing, Boingboing, StopDesign, and WaSP — all this within a span of two days. Traffic jumped from an average of about 200 visits per day to almost 2000 visits on 3/31, to over 3000 on 4/01.
It pays to be ready for traffic spikes and sudden popularity. Though the bandwidth issue may be dead to some, not all of us are hosted on paid or owned servers, or perhaps we simply wish to stick with what’s cheap, and are willing to accept bandwidth limitations for affordability. But that is no reason your web presence should go down in error screens with the first MeFi or Slashdot FPP. Here are a few tips to keep you afloat through the bandwidth crests:
- Streamline that code. Maybe it’s turning into a cliché, but web standards work. Trim out the nested tables, unnecessary or redundant
<div>class attributes, spacer GIFs (argh), and frames, and you can cut your page size — and loading time — to a fraction of what it was. There’s something to be said for minimalism.
- Have a smaller — or no — sidebar on deep pages. Inside pages probably don’t need your entire linkroll, sideblog, archive listing, WinAmp playlist, and whatever other sidebar paraphernalia you use on your front page. Fix up your templates so that a more basic sidebar (or no sidebar at all) is shown. Main navigation, breadcrumbs, and search form may be all you need while indoors.
- If you run a weblog, use individual archives. Single entry pages really help permalinking, and you don’t get hundreds of people loading up a whole month or week of entries just to get to that one anchored post. Of course, many of you still use services without individual entry archiving, in which case you should probably try and get the smallest increments you can. (Blogger goes down to Daily, I believe.)
- Compress your graphics. One reason M4WeSt used that single-tone B/W image was that the GIF compresses nicely, having only two colors to deal with: #000000 and #FFFFFF. It’s a good idea to use clean line art or solid expanses of clear, non-dithered, non-gradiated color. The former will compress well in GIF or PNG, the latter will work for JPGs as well.
Another cliché to remember: every byte counts. Here’s hoping your website stays up through those fifteen minutes of fame. Comments are open to any useful additional input.