Wednesday, May 26, 2010

Gotcha of the Day - Forcing IE8 to behave like IE7

A client of mine contacted me about an especially odd problem his site was having: regardless of the settings in IE 8, the page always rendered using the IE 7 engine (confirmed by using the F12 tools).

An HTML document convincing IE 8 to use a different rendering engine? That doesn't seem like something I could do, even if I wanted to. And reviewing his document further, there was no mysterious meta tag requesting this behavior.

After some head scratching, I finally viewed the Generated Source of the page. Sure enough, the first line of code was some funky meta tag, which said something about IE=7.0000. Yet, this meta tag was nowhere to be found in the document itself.

I used Firefox's web developer addon to inspect the Response Headers of the page. Sure enough, there was the header:

  X-UA-Compatible: IE=7

And of course, this functionality is widely known.

I love mysteries like these: they seem completely impossible, until you untangle them, and then they are obvious.

So, next time you say something is impossible...

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails