Wednesday, November 12, 2008

Does your website disappear in IE8?

Mine did.

I was recently given a pretty large redesign project, and during the planning stages I took the opportunity to add a long-missing DOCTYPE to the site. I chose a nice HTML 4.01 Transitional flavor because there was no way in hell the site was going to resemble anything close to XHTML anytime soon. At the very least, it would 1) get the site out of quirks mode, and 2) give us an eventual path to validation.

(I'm including this info to illustrate: we had a proper DOCTYPE, and knew the site would not be valid HTML going in.)

Months after the project was complete and launched, word came down that the site was missing in IE8. Not broken. MISSING. Like, "the page is blank."

No partial loading, no sudden flicker, no error message. The site simply would not render.

I was considering hard liquor as my preferred solution when one of my co-workers mentioned something he'd heard about a new META element, something about versioning. Ah, yes, that version targeting thing.

I added the following to the global website header:

<meta http-equiv="X-UA-Compatible" content="IE=7" />

...and suddenly the site worked in IE8.

This is not a "solution." I still don't know why the site vanishes in IE8. I mean, it rendered perfectly fine in IE5, IE5.5, IE6 and IE7 so OF COURSE IT MAKES TOTAL SENSE THAT IT COMPLETELY VANISHES IN IE8. Right?

No. It does not make sense. Anyway, when I do discover the root cause, I'll post it here. In the meantime, I guess I'll be asking IE8 to dumb it down to my level.


At 9:41 AM, Blogger Unknown said...

Here's one possibility.

At 2:12 PM, Blogger Jon said...

Thanks for raising this. I just spent the last couple of days rebuilding my site, and only check IE8 last, after updating everything, and was shocked that it do not work. Went into panic.

Anyway, if you ever work out why that bit of meta is required, or what was your problem was, let me know. Oh, will check that twitter link....

At 3:25 AM, Blogger Michiel van der Blonk said...

I experienced this in IE6 when loading sIFR recently. sIFR added a generated script tag, after the document was loaded. Check if there is a document.write anywhere in your source. Using document.write after the document is loaded would lead to a blank document. However, it should definitely not be just IE8.

At 1:57 PM, Blogger yulmec said...

Same problem here... your meta "fixe" works fine, but it's still a scary beaviors.

The strange thing... the source is complet when I view source. Html validation does not return anything that could explain this beavior

I am on Win 7, 32bit(beta... so I cannot complain too much).

At 7:49 AM, Blogger Harris said...

I was having exactly this problem in IE8 and I discovered it was because I had malformed a conditional comment.

<!--[if lt IE 8]>
stuff went here

should have been

<!--[if lt IE 8]>
stuff went here
<![endif]--> (note the bang)

So check for that sort of thing.

At 9:05 AM, Blogger osiris said...

IE 8 it's probably not the problem. IE 8 is more standards compliant that the precedent ones, so it's possible that your site is not standards compliant...

just my 2 cents

At 6:04 AM, Blogger all out alien said...

You could try checking for empty elements defined like <div/> and instead define them with an old fashioned closing tag (<div></div>).


Post a Comment

<< Home