An application I'm building is generating XHTML documents that are going to be distributed in a bunch of different ways, including email. I can open these documents in Firefox or Chrome (and by "open" I mean from Windows Explorer, not through a web server). With IE 7, though, I'm having two - possibly three - different problems.
If the files are named with the extension ".xhtml", then IE launches and then closes. Sometimes it's still running in Task Manager and I have to kill it. Sometimes not.
If I name them with the extension ".htm" or ".html", then they open properly, except the IE Information Bar comes up telling me that it has blocked content of some kind. These documents don't contain any scripts or iframes or objects - they're as plain-vanilla XHTML as can be. They don't even reference external CSS.
When the customer I'm developing this for opens the documents in his environment (he's just using the ".xhtml" extension at this point), IE opens them and renders them as XML documents.
I've spent a fair amount of time on Google to try and get to the bottom of this, and everything I find there has to do with specifying the MIME type in the HTTP header, which is not especially useful as I'm not actually serving these files.
The files all (seem to) have the proper DOCTYPE, processing instruction, and namespace declarations; the top of each looks like this:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Any ideas?