|
Posted by Benjamin Niemann on 11/04/07 11:39
John Salerno wrote:
> Right now the recommendation is to use content-type="text/html" in the
> <head> tag, but is that really correct? Should it be
> application/xhtml+xml? I'm wondering if the content-type attribute is
> supposed to parallel the way it's being served (or the proper way to
> serve it, meaning eventually we'd have to replace this attribute on any
> XHTML files being written today).
The content-type (in the META element) itself is meaningless - the browser
has to know it *before* it could parse the document and get it from the
META element... (only the charset parameter may be used by the browser).
The proper way to specify the content-type for a document it to set the
correct HTTP header.
XHTML1.0 *should* (in the RFC meaning: *do it* - unless you really know what
happends or may happen, if you don't) have the content-type
application/xhtml+xml, but it *may* be served as text/html, if it complies
to Appendix C of the spec.
--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://www.odahoda.de/
Navigation:
[Reply to this message]
|