Making IE8 Emulate IE7

Written by David Walsh on Friday, March 20, 2009


As you probably know, Microsoft Internet Explorer 8 was “officially” released yesterday. If you were caught off guard by this and haven’t had time to test your sites in IE8, don’t lose sleep; you can make IE8 render pages like IE7 using a simple META tag.

The XHTML

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

It doesn’t get much easier than that. Don’t use this functionality as a crutch for too long though!


Follow via RSS Epic Discussion

Commenter Avatar March 20 / #

Thanks for reminding me, all hell is going to break lose at my company because we are bound to a jvm based MLS system. Everytime there’s a new ie, the users download it only to find that it’s not compatible. Of course, ignoring the warning message that’s been on the front page for two months.

Commenter Avatar March 20 / #
James says:

I’ll wait for IE8 portable (if there will be one) to test it and my web sites.

Commenter Avatar March 20 / #

Wouldn’t is be lovey if something as simple as this could make every browser emulate Firefox.

A man can dream…

Commenter Avatar March 20 / #
Boris says:

NICE David,
do you know if there is a good IE8 stand alone tool so i can run IE6, IE7 and IE8 at the same time? I have IE6 & IE7 stand alone already :-)

Commenter Avatar March 20 / #
Commenter Avatar March 20 / #
Boris says:

@Allen

thanks. I tried it and it did not do well in IE7 with CSS/JS dropdown menus while it works fine in regular IE7.

Commenter Avatar March 20 / #
JOKe says:

tztz no this doesnt make IE 8 to act as IE 7 in meter of fact IE 8 is the most broken “think” in the world. the Compatability Mode is NOT IE 7
it is some strange mode maybe better than IE 8 but worst than IE 7. For example many jquery UI plugins does’nt work. Some CSSs related to padding/spacing and etc.

So THIS META tag is just “computability mode checked/clicked” for IE8.

David Walsh March 20 / #

@JOKe I wouldn’t stand by this as a 100% identical emulation — sorry I didn’t make that clear.

Commenter Avatar March 20 / #
Tim says:

For all of you developers scared of IE8, if there is one reason to upgrade it would be for the developer toolbar. Such an improvement from IE7’s developer toolbar, which I thought were pretty solid.

Commenter Avatar March 20 / #
xekhz says:

IE8 CRAP.
Use firefox, Stick to the standards

David Walsh March 20 / #

@xekhz: Well, we’re developing for users, not ourselves, so your comment does hold much water.

Commenter Avatar March 20 / #

ie8 does suck, it can’t even render google.com correctly… once the world gets a hold, hello Chrome #1 browser… btw Firefox Rocks

Commenter Avatar March 20 / #
Antonio Max says:

IE 8 should be a MANDATORY update for all windows machines across the globe.
But MS seems to not give a flying f* for developers anyway.

Commenter Avatar March 20 / #
xekhz says:

@David Walsh -> Well, we’re developing for users,

If you are developing for users then stick to the standards otherwise you are developing for micro$

Commenter Avatar March 20 / #
Asdorf says:

Very good but I think that web developers must first create websites that are standard-compilant not Internet Explorer compilant!

David Walsh March 20 / #

@xekhz: There’s a compromise in that, of course.

Commenter Avatar March 20 / #
Fabian says:

Actually, all the sites I did work well in IE8 without touching anything. I directly installed IE8 at my PC, I use the standalone browsers (IE6/7) provided by Xeno Code: http://www.xenocode.com/browsers/ – have a look :)

Commenter Avatar March 20 / #
tomcio says:

xekhz said: “Use firefox, Stick to the standards”…

Heh… Firefox/Camino has a veerrryy long way to be as standard-based as (for example) Safari* or Opera are standard-based.

Keep noticed: Spectacular “success”/popularity of Firefox is not making this browser a/the “standard”. I do not like (and do not use) Firefox (you may do not like other browser(s))…

I don’t care for websites dentured to work with internet exploiter (and their webmasters and users). I don’t care for ie (producers/fans/users etc.).

If your site works in Safari/Opera/Chrome (one of them used by your choice) than it will work OK also in other browsers (but not** in ie, only). Without needs to make tests in every browser. Have a nice day.

____

*) this one for Macs/iPhone only.

**) However you can add – if you feel “wanted by ms” – a denture, like IE8.js: http://code.google.com/p/ie7-js/

Commenter Avatar March 20 / #
Keith Pickett says:

@xekhz:

If you are developing for users then stick to the standards otherwise you are developing for micro$

As stated here, 43% of users still use IE6, IE7, and IE8. That’s hardly a demographic to ignore. I wish our (development) world was merry as you seem to think it is…

Commenter Avatar March 21 / #

I haven’t had time to test, but do you know if this triggers the same mode as if the user were to click the compatibility view button themselves?

Commenter Avatar March 21 / #

Nevermind, I see that someone mentioned this already. Somehow I failed to see that when I search the page.

Commenter Avatar March 22 / #
E11World says:

This will be really interesting.. I will try this. Haven’t seen or tested IE8 but I’m sure they’ve made some improvements and many f* ups along the way.

Commenter Avatar March 23 / #

Excellent and useful post. Just a minor addition to it – the meta tag will apply only if it is added above any linked files (link, script) in the head of the webpage.

Commenter Avatar March 29 / #
cleverdave says:

I tried IE8 for several days and I was miserable. I removed it and went back to IE7. I usually like new stuff ( I really like Firefox) but IE8 was not user friendly, at least not to me!

Commenter Avatar April 09 / #
Me says:

The more functional YET customizable Any browser becomes, the more glorious is it will be.

Commenter Avatar May 06 / #

If you are developing websites and want a great graphical preview of what the site looks like in different browsers I suggest you download the free beta application of Expression Web 3 Super Preview..

Super Preview lets you see rendering out as they appear in different browsers and let’s you correct problems in WYSIWYG mode..

The link for info and download is below..

http://expression.microsoft.com/en-us/dd565874.aspx

The javascript debugger and this new product will also make you like IE 8 a whole lot more.. Especially if you design web pages for different browsers..

Commenter Avatar May 29 / #

Safe my life !
Thank’s [ ].

Commenter Avatar June 19 / #
David says:

Thanks for the tip Dave, I needed it for an older project I did. You saved me a lot of embarrassment.

Commenter Avatar September 06 / #

Wow, very cool and helpful. Thanks Dave!

Commenter Avatar October 18 / #
Tony Montana says:

@David Walsh
Can I use those combinationa in the same webpage at the same time?

(i.e. the webpage`s design is based on ie8:
if you are in ie7, then emulate to ie8,
if you have in ie8 and you have ie7, emulates to ie7)

//Compatibilities

//From IE7 To IE8 Emulation

//From IE8 To IE7 Emulation

Commenter Avatar December 16 / #
Farabi says:

Awesome trick!!!!
Thank you very much

Commenter Avatar January 22 / #

THANK YOU! … you just saved me about 3 hours and a huge headache.

Be Heard!

I want to hear what you have to say! Share your comments and questions below.

Name*:
Email*:
Website:  


© David Walsh 2007-2010. Contact David Walsh. Powered by the remarkable MooTools javascript framework.