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.
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.
Thanks in advance for any explanation.
IE9 and all other modern browsers can handle XHTML properly without offering it for download.
If you are not seeing it happen then you are probably serving the page with the wrong MIME type.
Whether a page is HTML or XHTML is determined by whether the MIME type is text/html or application/xhtml+xml - what doctype is used is irrelevant.
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.
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 [URL="http://www.felgall.com/invxhtml.php"]broken XHTML page](http://www.felgall.com/realxhtml.php) 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), I attach two screens:
I have nothing installed in IE, this is a machine used seldom, I intended to keep it because of the IE8 that is not WinUpdated to 9.
As you can see, no download, but displayed correctly.
For now I have no explanation, but I didn't start diving deeply in browsers compatibility yet.
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.
(Thread moved and split into topic of its own.)
This topic is now closed. New replies are no longer allowed.