loge.hixie.ch

Hixie's Natural Log

2002-09-08 06:07 UTC Sending XHTML as text/html Considered Harmful

I've posted about this several times before, both on this Web log as well as in W3C mailing lists such as www-talk, but people were asking me about this recently, so I've put together this new document explaining why in my opinion it makes no sense to send XHTML as text/html, like so many people are doing.

As usual, I welcome comments.

Pingbacks: 1 2 3 4 5 6 7

2002-09-07 08:33 UTC Time zones in Web logs (+2 hours)

Someone pointed out that the times next to the entries here were wrong, by an hour.

It turns out the error is caused by a bug POSIX::strftime(). To quote from one of my tests:

use POSIX qw(strftime);
my $a = time;
my $b = gmtime($a);
my $c = strftime("%c", gmtime($a));
print "$b\n$c\n";

The output? A little worrying:

Sat Sep  7 08:17:14 2002
Sat Sep  7 09:17:14 2002

Apparently this a known bug in my version of Perl (5.005_03). DreamHost told me they were going to upgrade to a more recent Debian soon; hopefully they'll upgrade Perl at the same time.

Anyway, the net result of this is that my times are all going to be an hour off. Since the bug isn't in my code, I will not be changing this.

2002-09-07 07:47 UTC Time zones in Web logs (+1 hour)

I mentioned earlier that Simon Willison had linked to a post by Adrian Holovaty on the blogite mailing list (which I have now subscribed to, by the way) asking what to do about time zones on Web logs. Well, I got a reply from Nicolás Lichtmier suggesting a nice piece of XBL that would, for Mozilla users at least, fix up the time stamps to be in the user's local time zone. Thanks Nicolás! I have cleaned up the XBL a little and it should now be happily converting the times on this site into the most convenient time for you!

Pingbacks: 1

2002-09-07 03:44 UTC Bug 121084 (alias "Heidi")

While surfing the web I ran across a link to Mozilla Bug 121084 (please do not comment on this bug unless you are attaching a fix — there are enough comments there already). The bug's summary is currently:

cache: Images requested twice -> "The image cannot be displayed, because it contains errors." message [when "Compare the page in cache ..." set to "every time I view the page"]

This bug is most amusing. First, it is most visible on sites which block external links to their images. By far the most common examples of such sites are porn sites. In fact, the bug was found on a porn site. Now take a look at the length of the CC list on that bug.

Second, the testcase for this bug is so cute! So adorable!

Third, the alternative test for this bug is fun to watch (reload the page to see the effect). In fact, the whole bug (from a technical perspective) is quite fun. Every time we view an image standalone, we load it twice. You know, just to be sure. I can just imagine the kind of screwed up code path that would result in that kind of behaviour.

2002-09-06 08:52 UTC Rrrrbrrrrbrrr-tsssssstUNK

My laptop's hard drive is making some very unhealthy noises. (Regular readers will know that this is a long standing issue.) However, despite these highly suspect noises, there are no error messages. Not even after running chkdsk several thousand times (literally, I wrote a batch file which just kept running it). Grr. Very annoying, because I need an error message from Windows to convince Dell that the disk is damaged.

In other news, yup, it works! How fun is that.

In yet further news, it's nearly 10am. I think I should probably go to bed.

Pingbacks: 1