XHTML mime types annoyances
I would dearly love to be able to do the right thing with regard to XHTML mime types, but mixing AJAX and XHTML 1.1 seems to be a really hairy mess. IE8 and below, of course, don't want application/xhtml+xml at all, while IE9 is supposed to accept it, but it seems in practice it only actually wants it for XHTML5, not 1.1. Firefox is also fussy; once it's getting application/xhtml+xml, it doesn't want to handle AJAX in the same way. I did spend some time on a sitemap selector that checks the accept header of the browser, and then serves the correct mime type, but unfortunately the JavaScript also has to function slightly differently depending on the mime type, which complicates everything. I ended up rolling back to a previous version of the site. It will work in IE9 in compatibility mode, but that's pretty annoying.
I'm wondering if the solution might be to rewrite the site using XHTML5, but serve it as text/html (which is OK as long as it has the right doctype -- it will happen to be valid XHTML5, but I'll be sending it as equally-valid HTML5). That would probably make the AJAX operation much easier. We don't really care about old versions of IE, but I would like to have the site work on IE9 if it's not going to cost too much time and effort.