Content Negotiation
One more for the notebook: HTTP Content Negotiation (wiki, spec).
Implement this for CMBlog3, to let it switch between application/xhtml+xml and text/html at will. Then code in some exceptions.
To start with, add a function to ua.inc to parse the Accept: header and return an array of accepted items, with their relative weights. And then maybe one more function to take that array, and an array of possible implementations, and return the most desirable one. Finally, implement in CMBlog3 a quick check of that last function and feed it array(“application/xhtml+xml”,”text/html”), and then output (via header()) the resulting Content-Type.

XHTML: You may use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
RSS feed for comments on this post. TrackBack URI