PHP, Content Negotiation, and (X)HTML Pretty Printing
Sunday, January 4th, 2009The Goal
To have a functional, 100% validated website that serves documents in
the most appropriate format possible for a given user agent. The
resultant code generated will be well formatted and properly
indented.
Miscellaneous Realities
Some user agents don’t render application/xhtml+xml documents, so
they should be served text/html documents. XHTML should (by
specification) be served with the [...]