The Manifold Joys of IE

I received an email this afternoon that someone was having problems accessing this site.  Specifically, the browser was spewing out a bunch of XML followed by an error message (“The XML page cannot be displayed.  Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. “).  I started poking around and found a few problems with my coding (I forgot to put some of my image attributes in quotes and I forgot to close some <img> tags with a space and a slash—e.x. <img src=”…” width=“x” height=“y” />).

The person having the problem was running IE 5.5 (with no fixes), so it appears to me that it was incorrectly interpreting the page as XML rather than (X)HTML.  I was able to duplicate the error by copying index.html to testindex.xml.  But after fixing the above problems I realized that there are a couple of cases where I use characters that require escaping in XML but that are valid in HTML (the ‘&’ symbol in a CGI call, for example, requires escaping).  Unfortunately, fixing that would break the site for most browsers (Update—apparently not true according to the XHTML docs I’ve been reading).

My suspicion is that this is a bug in the original IE 5.5 and that it is not interpreting the first line of the file correctly.  Incidentally, the first line of the file was “<?xml version=‘1.0 encoding=‘UTF-8’?>”, which was added to fix the infamous F11 bug with IE 6.0.  I’ve temporarily removed this line to see if the person having the problem can load the page.

I should note that I’ve verified that the page loads correctly in IE 6 with the latest fixes applied (at least on my XP system) (and without the F11 fix), in IE 5.5 with SP1 (on Win2K), and Mozilla 1.1 (Linux).  The site looks like crap with NS 4.7x (but is anyone still using it?).

Update: I put the xml line back and added some other magical incantations to the source to see if I can accomodate both browsers.

Update 2: No joy.  I took out the xml line for now.  It’s kind of disappointing, because the XHTML standard strongly recommends it (although it doesn’t require it).  In any event, I ran this site through an XHTML validator and discovered several problems, especially with blockquotes.  I will continue fighting with XHTML later.

Comments are closed.