Poke a Stick in it
I thought about posting something about politics. Say, about how Rep. Istook (R, Oklahoma) managed to insert a paragraph into the 1300 page Omnibus Spending Bill, granting Congressional Committee Chairmen and their staff the right to examine the tax returns of anyone in the country, free of the restraints of privacy regulations. Or about how the House Republicans just voted to allow indicted felons to retain their Committee Chairmanships (how convenient: they could turn around and scrutinize the tax returns of the Prosecutor who indicted them).
Nah, I thought, just another typical week on Capitol Hill. I’ll only really get worried when the Republican Caucus votes to allow convicted felons to retain their Chairmanships and the Appropriations Bill contains language authorizing them to order FBI surveillance of whomever they choose.
Nope, if I want to choose a controversial topic, I should write something about XHTML and MIME types, what we, here at Musings, like to call the “third rail” of Web Design. There are those who say serving XHTML as text/html
is just fine and those who say it’s evil incarnate. Sort of a Red State/Blue State thing, but with much lower stakes.
Me, I figure it’s pointless to argue about whether people currently serving XHTML as text/html
should switch to serving it as application/xhtml+xml
. 99% of it is ill-formed tag soup, which would instantly produce a yellow screen of death if served with the correct MIME type.
But what about the remaining 1%? “I’ve got this XHTML thing down,” they say, “I could switch anytime I want. I just don’t feel the need to … yet.” Yes, pick up a case of the Patch at the pharmacy, and you’ll do fine.
Except …
Aside from the obvious difference that well-formedness now become an absolute requirement (and not an easy one to satisfy) there are lots of subtler differences between otherwise identical documents, served as text/html and application/xhtml+xml. You may not have heard about it, since most discussions get bogged down well before they get to the subtle stuff.
Fortunately, Gez Lemon has started putting together a test suite to illustrate the differences. Help him out by contributing your own examples of how switching MIME types affects the rendering of XHTML documents.
[Gez also has a service which lets you test serving up any page as application/xhtml+xml
. It’s somewhat more advanced than the one I linked to above.]
Re: Poke a Stick in it
I’ve been thinking I might add an entry “How is the treatment of application/xhtml+xml documents different from the treatment of text/html documents?” in the Mozilla Web Author FAQ. It’s not a frequent newsgroup question but is seems to be a frequent blog issue.
Perhaps “Should I serve application/xhtml+xml to Mozilla?” would also warrant an entry in the FAQ.