Forum Moderators: open

Message Too Old, No Replies

XHTML MIME-types...

"XHTML's Dirty Little Secret"

         

MonkeeSage

5:29 am on Oct 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



[xml.com...]

Great article! Need-to-know stuff for anyone thinking of migrating to XHTML2.

I especially found this tidbit to be VERY interesting!

Mozilla, in its infinite wisdom, will tell a server that it accepts application/xhtml+xml in the HTTP_ACCEPT header that it sends with every request.

Jordan

tedster

6:04 am on Oct 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks Jordan. In a nutshell, here is the alarm that's sounding:

browsers aren't actually treating your XHTML as XML. Your validated, correctly DOCTYPE'd, completely standards compliant XHTML markup is being treated as if it were still HTML with a few weird slashes in places they don't belong (like <br /> and <img />).

Why? The answer is MIME types...For HTML pages, the MIME type is text/html. For XHTML, the MIME type is supposed to be application/xhtml+xml.

The details indeed ARE important for anyone making the jump.

typhoon

12:23 pm on Oct 11, 2003 (gmt 0)

10+ Year Member



Yeah, this is one of the things that makes it difficult to transition to XHTML. I use the PHP solution, but it annoys me that IE is incapable of parsing the documents correctly.

g1smd

9:05 pm on Oct 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



>> I use the PHP solution <<

... and what is that solution? You lost me there.

SethCall

1:14 am on Oct 17, 2003 (gmt 0)

10+ Year Member



g1smd, its in that article, the php bit.