Ian Hickson wrote:
On Sat, 2 Dec 2006, Elliotte Harold wrote:
If you want to use XHTML, then use XHTML, send it with an XML MIME
type, and be happy.
If you want to use HTML, then use HTML, send it with an HTML MIME
type, and be happy.
What's wrong with option 1 is that it doesn't work in the browser with
the majority of the installed base, something I used to think mattered
to this group.
So why not use option 2 then?
Consequently I and many others choose option 3:
Use XHTML, send it with an HTML MIME type, and be happy.
This is equivalent to doing option 2 with a rose-tinted glasses on.
What you keep missing is, it's not just about browsers. Not all clients
are classic web browsers. The same documents are sent to many different
kinds of clients that do many different things. I need to pass
well-formed XML to my non-browser tools, and readable HTML to classic
browsers.
That means I have to send text/html to browsers (because that's the only
thing they understand) and let my clients ignore that hint.
By the way, browser sniffing doesn't fully solve this either, because
different tools using the same HTTP toolkit and the same browser string,
The client has to decide what the client needs, not the server.
--
Elliotte Rusty Harold [EMAIL PROTECTED]
Java I/O 2nd Edition Just Published!
http://www.cafeaulait.org/books/javaio2/
http://www.amazon.com/exec/obidos/ISBN=0596527500/ref=nosim/cafeaulaitA/