Suggestion: Check Content-Type sent by the Webserver

Hello,
I have a suggestion which should help troubleshooting websites in some
cases:
The validator should also check the content-type sent by the webserver and
warn if the document has been checked as xhtml, yet the webserver
content-type response is text/html instead of application/xhtml+xml. As, if
that is the case, the document might be parsed incorrectly in most
browsers, including Firefox, Internet Explorer and Chrome. The most common
issue is the incorrect handling of self-closing tags such as <div /> if the
content type isn't application/xhtml+xml.
Also, no matter what is set in the <meta> tag of the xhtml document, the
response by the server overrules its content type.

See examples for this:
http://www.webdevout.net/articles/beware-of-xhtml#content_type

Regards,
David Henninger

Received on Tuesday, 27 December 2011 23:07:07 UTC