I've been reading this site and lately especially this thread and find it very informative. I've been using XHTML for as much time as I'm a conscious developer, and I admit - kind of a 'victim' of the XHTML hype, not realizing fully what it was in the first place back in the years. First, I was using HTML in ancient times some 6-7 years ago.
I don't like where HTML(5) is headed to, there are still no clear standards, some browsers do implement some things, and we will have to reiterate the well known hell from when IE5/6, Netscape 4.x etc. were widespread.
But I wanted to point on something - the IE8/9 application/xhtml+xml support and the alleged download dialog they throw upon it.
Originally Posted by felgall
The following page is done using PHP to add the MIME type header before the page is sent to the browser.
I tried this in IE8 and 9, this page is rendered prefectly in both, no download dialog, no nothing. I double checked - the server sends the content type HEADER as application/xhtml+xml.
So where is the catch here? These are machines with Win7, and no registry hacks were ever applied. I kept reading here how IE (even 9) would offer real XHTML for downloading, still I do not witness this.
felgall, thanks for replying so fast.
What I meant was I tried your link (opened it in various browsers), and even in IE8 it opens right. Although I could just try and write this myself, you've done it and I used it directly for the test. Obviously you created it to demonstrate the correct MIME type, which is what it does, still IE8 opens it right.
Also I read here that even IE9 wouldn't support XHTML and its related MIME type. Thus my confusion.
I'm in the process of looking around to update my front-end skills (I'm mainly PHP with mysql/ms sql) and wondered to what degree I could count on HTML5 right now..
To my knowledge M$ IE9 was the MS first browsers to properly support 'application/xhtml+xml' thus assuming you have IE9 is should display. If you only have a standalone IE8 it would ask you to save or download, etc. All my pages are 'application/xhtml+xml' to those browsers that support the MIME or given 'text/html' to the legacy browsers.
felgall, thanks for replying so fast.
What I meant was I tried your link (opened it in various browsers), and even in IE8 it opens right.
Attempting to open my real XHTML test page in IE8 will result in the file being offered for download. If it actually opens the page then it either isn't IE8 (or earlier) or you have somehow installed a plugin into IE8 that adds XHTML support. If the latter then I would be interested in knowing what plugins you have installed so as to work out which is adding that support. IE8 definitely offers that as a file for download when I try to access it using that browser (I just retested it and it displayed the save as dialog instead of the page). Tests I have done in IE9 do result in the page being displayed however if you try opening my broken XHTML page it also opens in IE9 when it shouldn't. Restesting that page in the latest version of Opera shows that Opera now also opens it rather than correctly displaying an error message the way it used to so it looks like the latest version of Opera has worse XHTML support than earlier versions - since having the page not display iof there are errors is one of the main benefits of using XHTML in the first place.
Actually it is a relatively rarely updated Win7 (virtual machine)
The only thing I can think of then is that it is the Win 7 VM that is supplying the XHTML support. IE is so closely tied into the operating system that it is possible that it behaves differently on different versions of Windows. It definitely offers the page for download in IE8 on Win XP.