application xhtml xml

March 2nd, 2009

With XHTML, mime type really makes a difference, especially 1.1. At least in my experience it does. I'm finding that pages will render completely different if the mime type is text/html or application/xhtml+xml.

And from what I can tell, application/xhtml+xml is the future! Yay.

In PHP, this can be done like this:


I was trying to figure this out to use the nice shjs package, but for some reason it wouldn't work without the right mime-type.

Oh, but of course Microsoft Internet Explorer doesn't like this. Thankfully there is a rough fix, but I'll probably just have use a separate stylesheet to render the output as html instead of xml. Good ol' MSIE.

Yearly Indexes: 2003 2004 2006 2007 2008 2009 2010 2011 2012 2013 2015 2019 2020 2022