node.innerHTML methods) and how they relate to XHTML pages served with mime types of
application/xhtml+xml. The short version is ‘they don’t work at all’ and in fact fail miserably by not even providing the alternate content.
You may be asking: Is this really a problem? I say not yet. The only time this will ever be an issue is if you are serving your XHTML pages with mime types of
application/xhtml+xml. I don’t know of any websites at all that serve their content like that, so as long as you stay in
text/html land, you will be fine.
In fact, here’s a quick list of your favorite web standards compliant websites with their doctypes and the mime types of their content: (If you want to check your own site and have access to a Linux/OS X machine, try ‘
curl -I -H 'Accept:application/xhtml+xml' mysite.com‘ in the terminal)
- csszengarden.com (XHTML 1.0 Strict) –
- webstandards.org (XHTML 1.0 Strict) –
- wired.com (XHTML 1.0 Transitional) –
- abcnews.go.com (XHTML 1.0 Transitional) –
And the list goes on – sprintpcs.com, disney.co.uk, kcchiefs.com – all
param tags inside the
object tag, Opera is very strict (perhaps too strict?) and wouldn’t even let me use
height on the
I’ll write up a whole thing on my findings soon, and possibly provide a hacked together DOM way of embedding Flash, but I won’t be recommending that you use it, as the file size will most likely be larger than using a simple
UPDATE (10-31-2004): This guy over here thinks that I’m advocating the use of
text/html mime types. Well I’m not, this is just pointing out that since so few websites serve content as
application/xhtml+xml that using
document.write will work better compared to the alternative DOM methods, which are such a pain in the ass, I keep putting off building the sample page to show how you do it.