Web Development


A grreat FAQ on XHTML is available, and I encourage all fellow web developers to read up. I found a few interesting things:

First read this:

strong>Why is it allowed to send XHTML 1.0 documents as text/html?

XHTML is an XML format; this means that strictly speaking it should be sent with an XML-related media type (application/xhtml+XML, application/xml, or text/xml). However XHTML 1.0 was carefully designed so that with care it would also work on legacy HTML user agents as well. If you follow some simple guidelines, you can get many XHTML 1.0 documents to work in legacy browsers. However, legacy browsers only understand the media type text/html, so you have to use that media type if you send XHTML 1.0 documents to them. But be well aware, sending XHTML documents to browsers as text/html means that those browsers see the documents as HTML documents, not XHTML documents.

Then read this:

Why is it disallowed to send XHTML 1.1 documents as text/html?

XHTML 1.1 is pure XML, and only intended to be XML. It cannot reliably be sent to legacy browsers. Therefore XHTML 1.1 documents must be sent with an XML-related media type, such as application/xhtml+XML.

Now in the source of that webpage, I see:

< ?xml version="1.0" encoding="UTF-8"?>
<HTML xmlns="">

but Mozilla says:

Type:  text/html

Does anyone taste dogfood? Will the net ever move to towards XML? Not even the W3C feels it’s safe to move.

I don’t think we will ever see websites that say:

Type:  application/xhtml+XML

On a sidenote: Does anyone know what versions of Internet Explorer support this trick? Is it 5.0+? Or just 6.0?

3 replies on “XHTML FAQ”

Your post makes no sense. They are eating their own dog food. Notice that the first FAQ entry refers to XHTML 1.0, whereas the second entry refers to XHTML 1.1. Notice that the FAQ itself is in XHTML 1.0, and they follow their own rule for setting the content type.

Not really:

They want people to push towards application/xhtml+XML. But not even they will attempt it.

The web will never move over unless someone leads. Not even the W3C has attempted yet. That says to me, the web is nowhere near beginning to do so. And by the time it does, we will have been through a few more generations of standards that never get used.

That ‘FAQ’ is basically an advocacy document, to try and counter all the publicity that problems with XML on the web have been getting. Statements like:

“However, thanks to XML and stylesheets, such strict element-wise backwards compatibility is no longer necessary, since an XML-based browser, of which at the time of writing means more than 95% of browsers in use, can process new markup languages without having to be updated. ”

are really shameful. For a start, IE isn’t XML-based in any meaningful way so “95%” of all browsers is closer to 5% of all browsers (unless we’re counting each seperate browser product rather than weighting by marketshare, which is equally misleading). Further, I have serious dfficulty believing I could send XHTML 2 to Mozilla today and have any useful kind of interpretation. I’m certian we wouldn’t see any of the new semantics such as href and src on everything and automatic object-style content negotiation.

The upgrade might not be too difficult but implying that it would work immediatley is inaccurate.

It is a little concerning that the HTML working group is spendiing time spreading misinformation rather than doing anything useful.

Leave a Reply

Your email address will not be published. Required fields are marked *