Home | Articles | Images | Links | Contact Me | Login Archive | RSS Feed | ATOM Feed

Calendar

AprMay 2008Jun
SMTWTFS
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567

Suggested Reading

Blog Stats

Posts - 1305
Stories - 6
Comments - 2155
Trackbacks - 461

Flair

Disclaimer

The content of this site is my own personal opinion and does not in any way represent my employer, it's subsideries or affiliates. These postings are provided "AS IS" with no warranties, and confer no rights.
XHTML MIME type in Internet Explorer

I was interested in playing around with XSLTunit, which is a unit testing framework for XSLT, but I found that Internet Explorer wouldn't open it. It kept popping up a "Save As..." dialog box. Hmmm...

So I fired up Fiddler to see what the MIME type was that was being sent by the server. It was "application/xhtml+xml" which was a MIME type that I had never seen before. After a bit of googling, I discovered that "application/xhtml+xml" is the correct MIME type for XHTML files!

Although a number of people seem to think that Internet Explorer doesn't support it, the real answer is that it is just missing an entry in the registry to tell it what to do with that MIME type. At least, that is all I had to do to get it to work. (I'm sure some XHTML purist will say that IE is still broken even with this hack, but I don't really care. All I wanted was to be able to browse the XSLTunit web site!)

Here is the registry entry you need to add. Put this into a text file named "xhtml_mime.reg" and double click on it. Then you should be able to view the XSLTunit site (and any others that use the new XHTML MIME type).

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/xhtml+xml]
"CLSID"="{25336920-03F9-11cf-8FD0-00AA00686F13}"
"Encoding"=hex:08,00,00,00
"Extension"=".xhtml"

(This was tested on Windows XP SP2, your mileage may vary on other systems.)

posted on Friday, October 22, 2004 11:34 AM

Search

Supported By


Current Promotion
ThinkGeek

Hosted By