|
Posted by cwdjrxyz on 04/17/07 01:37
On Apr 16, 5:49 pm, Neo Geshel <got...@geshel.org> wrote:
> I am curious about the prevalence of XHTML usage among web developers,
> and its usage in web sites in general. Does anyone have any statistics
> that could show the numbers of sites created in XHTML (all flavours) in
> comparison to traditional HTML (including spaghetti code sites)?
Many write code in xhtml. However, this is useless unless the page is
served properly as aplication/xml+xhtml, since if you just serve as
the usual text/html, the xhtml code gets treated as ordinary html and
not xhtml. The IE browsers can not handle true xhtml served properly,
and if a page claiming to be xhtml can be viewed on an IE browser, it
is not - just mis-served xhtml being treated as html. You have to
convert an xhtml page to html for it to be seen on IE. This can
involve separate xhtml and html pages with some mechanism to detect if
the browser will accept xhtml at all, sometimes done with header
exchange info, or if xhtml support is not detected, php or some other
server side script is used to convert a single xhtml page to a html
4.01 strict page for IE and other browsers that do not handle xhtml. I
would guess that at least 95% of pages claiming to be xhtml are mis-
served as only html. Since most servers already associate .html with
the mime type for text/html, you must then use some other extension
such as .xhtml or .xml and associate it with the mime type application/
xml+xhtml for a true xhtml page.
[Back to original message]
|