Hey, look, it’s a new W3C site.
Hm:
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Ooh, XHTML…
$ curl -sI http://beta.w3.org/ | grep 'Content-Type' Content-Type: text/html; charset=utf-8
Heh.
Comments:
Fail.
Sad isn't it, how you have to do crazy things like that just to satisfy cranky old Microsoft browsers?
I really wish people would stop using the XHTML doctype.
I fully switched to using <! DOCTYPE html> a few months ago and it's so refreshing to have a clean intro to all my markup.
Serving XHTML 1.0 Strict as text/html is perfectly valid, so what's the problem? (Go read the specification!)
the problem is that browsers will render it as an invalid HTML4 (not xhtml) page.
"The 'text/html' media type [RFC2854] is primarily for HTML, not for XHTML. In general, this media type is NOT suitable for XHTML except when the XHTML is conforms to the guidelines in Appendix A. [...]
XHTML documents served as 'text/html' will not be processed as XML [XML10], e.g., well-formedness errors may not be detected by user agents. "
(http://www.w3.org/TR/xhtml-...)
Leave a comment: