Neil Turner's Blog

Blogging about technology and randomness since 2002

CSS Optimisations

I’ve edited the stylesheet to acheive two things:

  1. To validate without any errors or warnings (which it does, see W3C’s CSS Validator)
  2. To be smaller – I don’t use all of the attributes from the original MT stylesheet, so the unused ones can be removed. Doing so means that the sheet is around 400 bytes smaller. It may not sound much, but this file gets accessed 1000 times each day. Over a month, I can save 17MB of data transfer. Now that’s more like it

I also restructured it so that it looked easier to read and removed excessive spaces, tabs and semi-colons, again to cut the bloat.
Of course, one surefire way to lower my bandwidth usage would be to stop writing anything. But that would get boring.
If it interests you, I’ve used 872MB this month so far, so I’m on target for about 1.1GB – well within my 2GB limit. Phew.

5 Comments

  1. Hmmm, I wonder if I can get a bonus if you are forced to upgrade…. How do you set a cron job to run wget again? 😀
    I’ve used 1.31Gb so far this month, and I’m predicted to use 1.97Gb. It’s amazing how “busy” web logs are!

  2. Actually, if you try to use wget here you’ll just get a load of 403 errors :). Apparently some email harvesters identify themselves as wget so I blocked it on the assumption that barely anyone uses it. I’ve had no complaints so far.

  3. It’s actually strange that you mention email harvesters: last week I received a spam email from the email address I use for commenting to your blog….
    Since you’ve just reminded me about it, I’ve looked into the issue and I’ve found out where the email addresses are “leaking” from: http://www.neilturner.me.uk/index.rdf is at fault with the foaf:person sections for each entry.
    Any chance of “fixing” it as 1,600 spams a day (less than 30 “real emails” in the same period) is annoying enough!

  4. It’s fixed. Just had to add spam_protect=”1″ to the tag. Sorry for the inconvinience, and thanks for letting me know.
    Sadly I can’t block every email harvester, only those that I know of. And some now pretend to be web browsers (for example have an IE user agent) so I can’t block them without blocking all IE users.
    Wait a minute… maybe that isn’t such a bad idea >:-). Nah…

  5. If you do decide to block IE users at least wait until tomorrow – I’m so short on memory at the moment that Mozilla won’t load correctly…