This feed contains pages in the "web" category.

At one point in the life of my web server, .php files were not being sent with an appropriate MIME type. I think they were being sent as text/plain, which caused some web browsers to display the HTML rather than rendering it.

As a kludge to get around this (rather than have the web admin change the server config), I added to my start_header() function:

header("Content-Type: application/xhtml+xml; charset=utf-8");

and all was well.

Or so I thought.

As it turns out, I don't really test my web pages on Internet Explorer. I figure that if they work in Firefox and Safari and the w3c validator say that my page is fine, then I'm good. Even if the page doesn't look right in IE, the content should be there.

Well, I was wrong, kinda.

Apparently, IE (even through IE 7) doesn't understand the media-type application/xhtml+xml and so prompts the user to just download and save the web page. sigh I'm not real sure when I made that change, but I'm guessing over a year ago, and I just discovered the problem today. Whoops.

Reading the w3's XHTML Media Types web page gives a bit of insight, in that you should only send application/xhtml+xml if the web client (browser) explicitly claims to support that type, otherwise send text/html.

I should have known better than to force the type of the document that I'm sending, I guess. Oh well, removed the header call from my PHP, the web server has been fixed at some time in the distant past, and now IE users can see my web pages.

Hrm, I wonder if that's a good thing. :-/

Posted Tue Feb 24 19:21:34 2009 Tags: web