Reply to Re: What's the real content type of XHTML?

Your name:

Reply:


Posted by Benjamin Niemann on 10/07/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/

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация