Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-11-25 22:23:03

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Trick: send application/xhtml+xml to IE

Very interesting. I found this today.

W3C: HTML and XHTML Frequently Answered Questions (emphasis mine):

Does Microsoft Internet Explorer accept the media type application/xhtml+xml?

No. However, there is a trick that allows you to *serve XHTML1.0 documents to Internet Explorer as application/xml*

…Although you are serving the document as XML, and it gets parsed as XML, the browser thinks it has received text/html, and so your XHTML 1.0 document must follow many of the guidelines for serving to legacy browsers.

As I can understand it, does this mean that while crappIE will still see so-called tag soup, it also means no sniffing to send two different mime types?

Offline

#2 2005-11-26 03:39:44

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Trick: send application/xhtml+xml to IE

It looks that way doesn’t it other than needing that extra file in your root directory.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#3 2005-11-26 15:03:43

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: Trick: send application/xhtml+xml to IE

Mary, or Stuart,
What is the primary goal of someone serving up xhtml+xml in this fashion?
As you both know, I am on the learning treadmill :)

Is xml best for smaller devices, or does it just add new features? I have heard of some sites being served up entirely in xml, but I don’t yet understand the pizazz of all that?

Just to keep the discussion as low brow as possible :)

Matthew


Offline

#4 2005-11-27 02:14:44

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Trick: send application/xhtml+xml to IE

It’s the mimetype you’re supposed to serve xhtml with, as xhtml is “a reformulation of HTML 4 as an XML 1.0 application”, it follows xml rules. IE freaks out if you do that though, and will serve the page as a download, rather than display it.

The Road to XHTML 2.0: MIME Types

Bah. I found this today: ‘application/xml’ in Internet Explorer

I did a little test on my own, and it didn’t work. Plus, Anne said this: “Note that Internet Explorer is always in quirks mode when it is in XML mode”. Screw that then. :(

Offline

#5 2005-11-27 08:04:36

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Trick: send application/xhtml+xml to IE

Well I tried the top example and everything still seems to be working fine, even in IE, but when I validate in FF, it passes OK but still says I’m serving text/html. That’s not right is it? Or have I missed something?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#6 2005-11-28 01:46:23

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Trick: send application/xhtml+xml to IE

“…says I’m serving text/html.”

Uh huh.

“That’s not right is it?”

Nope. Check the last link I posted. Anne ran a few different tests with this technique, and it seems it doesn’t really work. Darn it all, I was so hoping for a moment there…

Offline

#7 2005-11-28 02:14:18

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,255
Website

Re: Trick: send application/xhtml+xml to IE

It can’t really work, because IE win/mac do not have a parser for application/xml and application/xhtml+xml. Imho, it is a completely pointless exerise.

Last edited by phiw13 (2005-11-28 02:14:45)


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#8 2005-11-28 03:34:55

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Trick: send application/xhtml+xml to IE

The point was “no sniffing to send two different mime types”, not attempting actual support of same. But it doesn’t work anyway, so I don’t understand why it was suggested as a valid adaptation in the first place.

Offline

#9 2005-11-28 03:39:09

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Trick: send application/xhtml+xml to IE

I did wonder because I left everything as is then removed that second line they tell you to add pointing to the new file and IE still worked. Oh well. One day all browsers won’t be made that way. ;)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

Board footer

Powered by FluxBB