You are here: Re: Prevalence of XHTML? « HTML « IT news, forums, messages
Re: Prevalence of XHTML?

Posted by cwdjrxyz on 04/17/07 16:13

On Apr 16, 8:37 pm, cwdjrxyz <spamtr...@cwdjr.info> wrote:
> 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.

I have 4 simple example pages served as html 4.01 strict using the
usual .html extension, xhtml 1.1 served with the mime type application/
xhtml+xml associated with the extension .xhtml, xhtml 1.1 served with
the mime type application/xml associated with the extension .xml, and
a php page that rewrites a xhtml 1.1 page as html 4.01 strict if
header exchange can not establish or can not detect that the page can
handle the mime types for true xhtml .

http://www.cwdjr.info/extensions/auto.php

http://www.cwdjr.info/extensions/xhtml11.xhtml

http://www.cwdjr.info/extensions/xhtml11.xml

http://www.cwdjr.info/extensions/html401strict.html

Text on the pages tells more.

 

Navigation:

[Reply to this 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

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