W3C home > Mailing lists > Public > www-validator@w3.org > December 2011

Suggestion: Check Content-Type sent by the Webserver

From: David <henningerdavid@googlemail.com>
Date: Tue, 27 Dec 2011 16:02:47 +0100
Message-ID: <CA+Z6JvryLEZLtJJ=nQgviVT-9KK_BpdY8OcvT5fvMq9+fvK4OQ@mail.gmail.com>
To: www-validator@w3.org
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:49 GMT