views:

627

answers:

6

Hopefully some has some knowledge of this.

I'm fast realising that IE8 certainly can't be ignored anymore. I had previously put it down to either a) just a buggy piece of software, or b) still to small a piece of the market share. Now, however, I'm seeing more and more requirement to make sure sites work on it.

My question is can I switch over to testing on IE8 only and safely 'believe' that the resulting code will still work on IE7?

Any thoughts/knowledge would be helpful. Cheers.

+10  A: 

My question is can I switch over to testing on IE8 only and safely 'believe' that the resulting code will still work on IE7?

No.

Daniel Daranas
I'm still waiting for the day where I can write "No." as an answer and get up-voted for it. :)
Tomalak
You just need to write it quick enough ;-)
Daniel Magliola
I have upgraded my browser to IE8 and have so far noticed no differences between IE7 and IE8 running in IE7 mode.
kim3er
Another tip is to quote the original question, otherwise SO doesn't let you post a three-character answer :)
Daniel Daranas
@kim3er: When developing professional applications it is important that, if your requirement is that it runs on X, Y and Z, you test it on X, Y and Z.
Daniel Daranas
Thankfully as a "Professional Developer" I do just that and so far I have noticed "no differences between IE7 and IE8 in IE7 mode".I had hoped the last part of that statement would imply that I'm actively comparing the two browsers.
kim3er
@Tomalak: I feel the same way!
Cerebrus
@kim3er: You may have compared them, but still you have to trust that IE8's emulation of IE7 is perfect, and a better alternative, which is testing directly on IE7, exists. mbenny points out some actual differences here: http://stackoverflow.com/questions/712055/can-i-get-away-with-testing-sites-using-ie8-with-ie7-compatibility-on/712087#712087
Daniel Daranas
+3  A: 

Whether IE8 is ready or not is not a valid reason to ignore it for testing. It is becoming used widespread. Therefore if you want high coverage of your websites then you should test them thoroughly in all major browsers. This includes IE7 AND IE8, reagardless of any compatibility options.

Robin Day
+1  A: 

You can switch over to IE8 and do compatibility tests targeting IE7 in IE8's compatibility mode.

Magnus Johansson
...Or sort of. Consider http://stackoverflow.com/questions/712055/can-i-get-away-with-testing-sites-using-ie8-with-ie7-compatibility-on/712087#712087
Daniel Daranas
+9  A: 

No, IE8 is radically different from IE7. And it's radically different from any other decent browser too, so you can't rely on other tests...

And yes, it's installed in enough machines now that we need to test for it too already.

The good news is that now IETester actually works (it didn't work at all for me a few months ago, it wouldn't even load) so definitely give it a shot, even if you tried it before and it didn't work for you. And definitely test in the 3 versions.

http://www.my-debugbar.com/wiki/IETester/HomePage

Daniel Magliola
thanks, this is the kind of knowledge I don't have and am I'm looking for
David Archer
There are differences between IE7 and IE8/Compatibility7. The feature is decent for fixing up broken sites for end users, it isn't good enough to substitute for testing in IE7 for developers.
David Dorward
@David: Really? Uh-Oh....Looks like i'll be creating a new VM :-(Thanks for that
Daniel Magliola
With Windows 7 you can have VMs that run in the background while the applications run in the foreground, so that you can have two XP VMs running IE7 and IE6 but only see the IE7 and IE6 Windows on your desk.
J. Pablo Fernández
+6  A: 

You can force IE8 to render pages as IE7, which can provide a workaround, since IE7 and IE8 can't cohabitate. Just add the following tag into the <head>:

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

Microsoft also provides this tag to be either added into the HTTP header or the site's header:

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

Microsoft has more information on using the tag on the developer readiness page.

My understanding is that the entire IE7 rendering engine is left intact in IE8, so sites can just add in those headers and have it drop down to the IE7 mode. However, changes were made to the DOM and for security that were not backported to IE7, so the transition isn't perfect.

Firefox/Safari/Chrome/Opera/etc. completely ignore this tag. There's a great write up at A List Apart.

A. Scagnelli
emphasis on "workaround"... sticking with IE7's poor standards support in the long run is asking for trouble. As for the meta tag, any non-IE8 browser will ignore it.
scunliffe
Microsoft.com uses this workaround. :)
jalf
@scunliffe: thanks for the note on how other browsers handle it, i'll update the answer now.
A. Scagnelli
+1  A: 

For an easy way to test in browsers, check out IE Tester (and debugbar at the same link). It emulates IE 5.5 on up. I personally still use IE7 (as its what most of my clients use) but check compatibility in IE Tester for 6 (yes, still have clients using 6) and 8. I don't think it covers all compatability issues but I haven't yet run into a problem for my purposes.

I also asume you are testing for Firefox and other non-IE browsers.

monkeypushbutton