tedych — 2011-12-22T11:01:11-05:00 — #1
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.
felgall — 2011-12-22T15:08:10-05:00 — #2
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.
tedych — 2011-12-22T15:16:03-05:00 — #3
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..
xhtmlcoder — 2011-12-22T15:22:03-05:00 — #4
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 — 2011-12-22T16:02:18-05:00 — #5
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.
tedych — 2011-12-22T16:15:58-05:00 — #6
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.
felgall — 2011-12-22T17:39:49-05:00 — #7
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.
paulob — 2011-12-23T05:11:31-05:00 — #8
(Thread moved and split into topic of its own.)
stomme_poes — 2012-03-07T06:15:08-05:00 — #9