Hello!

While researching for my own website I stumbled upon this page from the W3C:
http://www.w3.org/TR/xhtml-media-types/#application-xhtml-xml (Also take a look at 3.5 Summary)

As you can see, Drupal 6 should use the media type "application/xhtml+xml" instead of "text/html", because the drupals doctype say it's XHTML.

Any XHTML Family document MAY be served as 'text/xml'.
The considerations for 'application/xml' also apply to 'text/xml'.
Whenever appropriate, 'application/xhtml+xml' SHOULD
be used rather than 'text/xml'.

Comments

xmacinfo’s picture

XHTML support both, actually.

The use of 'text/html' for XHTML SHOULD be limited for the purpose of rendering on existing HTML user agents, and SHOULD be limited to [XHTML1] documents which follow the HTML Compatibility Guidelines. In particular, 'text/html' is NOT suitable for XHTML Family document types that adds elements and attributes from foreign namespaces, such as XHTML+MathML [XHTML+MathML].

So, in 2008, there are still a lot of user agents who would not be able to browse Drupal-based sites if Drupal switched to "application/xhtml+xml".

However, any theme author can immediatly use "application/xhtml+xml". Core parts of Drupal do not need any modification to support "application/xhtml+xml".

Danic’s picture

So, in 2008, there are still a lot of user agents who would not be able to browse Drupal-based sites if Drupal switched to "application/xhtml+xml".

Interesting, I did not know that! Thank you.