A forum for discussing XHTML issues for both XML and HTML developers is a Public Group with 739 members.
- A forum for discussing XHTML issues for both XML and HTML developers
- Public Group,
- 739 members
Tool for _serving_ XHTML 1.0 as XHTML written
I have built a tool that amongst other things allows website
administrators to serve XHTML 1.0 static pages as true XHTML to UAs
that understand it. That is, _truly_ XHTML-capable UAs get content
served with the xhtml mime type and others see text/html. The tool is
for Apache webservers and is written in PHP.
The tool was built originally in order to provide safe gzip
compression on Apache servers that did not have the required modules
or where more control was wanted in respect of old-UA-safety tuning.
I extended it do add support for cache-friendliness, then XHTML BC
and then added a few more features concerned with correct HTPP
headers for multilingual sites.
I'm interested in getting some feedback about correct design
decisions before I take this mini project further and would like to
get some suggestions and possibly even recruit an alpha tester or two
at some stage.
At the moment this is only suitable for users who
(1) author static xhtml pages,
(2) write valid XHTML 1.0 BC in HTML-compatible style (unless you
want to break the rules by serving other XHTML versions such as 1.1
(3) author all XHTML pages in UTF-8,
(4) use Apache and have PHP 5 available (not tested on Apache 2.x
yet, limited testing on PHP 4.x)
(5) are able to place a .htaccess file on the server
The tool does not ever rewrite XHTML as HTML on-the fly. It simply
changes mime type.
The nice thing about the tool is that any Apache website admin can
install the php tool as long as they have PHP5 and can install or
modify a .htaccess file, without needing to modify or reconfigure the
The tool uses multiple checks to take pains not to serve
application/xhtml+xml as such to UAs that cannot understand it even
if they falsely claim they can, and on the other hand will serve
XHTMl to certain 'shy' yet xhtml-capable 'known good' UAs on a
whitelist. Great pains have been taken to avoid vulnerabilities to
error caused by the evil that is browser UA string sniffing and
capability based checks are used extensively.
I would be interested to find out about peoples opinions and
experience of current practice in particular concerning mixed-
namespace applications, XHTML2 and XHTML5/HTML5.
Q: What is the right thing to do about XHTML 1.1/2.0/XHTML5 where
XHTML may not be served as text/html?
Q: Do people down-convert to HTML in some such cases? How?
Q: Thoughts on problems with proxy caches?
cecil (at) cecilward (dot) com