Running Multiple Internet Explorer Versions

As a web developer, one of the jobs I enjoy least is making sure that the sites I build are going to look good to all our visitors, not just to me. Like most developers, I develop my website for Firefox, then check it's OK in other popular browsers. Given our relatively low visitor volumes (at least so far) and limited time available for testing, in practice, this means testing Internet Explorer 6 and 7, and hoping that Opera, Chrome and Safari are as standards-compliant as Firefox (which is a fairly safe assumption).

One of my bugbears has been that as a Vista user (I'll explain why another day, but there are good reasons!) I had Internet Explorer 7 as my installed browser, and the only way I could test Internet Explorer 6 was using a Windows XP virtual machine. This is OK, but my development is all done against a virtual Linux server, and let's just say that Vista plus two virtual machines on a 2GB laptop starts to get a little strained. It worked OK, and I've implemented enough IE6-only hacks to know that it's worth the effort, but it's not ideal.

Things came to a head when Microsoft finally starting pushing Internet Explorer 8 out through automatic updates. Given that a lot of people are going to be upgrading (whether they know it or not), I'd better start testing that too. I couldn't face having to run two Windows VMs to test IE6 and 7 while I run IE8 in my main OS (and don't jump in with the "IE8 can render pages using the IE7 Trident rendering engine" line - I didn't know about that at the time), so I started to look for alternative solutions.

The answer came with the Internet Explorer Collection - a magic bit of wrapping that lets you install multiple versions of Internet Explorer on a single PC, going right back to IE1.5 (if you must). This gave me a plan to upgrade to IE8, and use this collection to test IE6 and 7. Small hitch when I ran the installer though - despite the documentation saying IE7 and IE8 would run on Vista, the installation options for those versions were greyed out.

A quick email to the hugely helpful Hilbrand (who I guess wrote the collection packaging) and an impressively quick reply explained not only why the options were greyed out, but also educated me about the option in IE8 to render using the IE7 engine (and not just in IE7 compatibility mode) under the "Developer Tools" menu.

So now I'm able to test using native Firefox, IE8, IE7 (using IE8's rendering option), and IE6 (using the Internet Explorer Collection). And not a single virtual machine in sight.

Comments

Conditional comments don't work properly!

I dropped this code into my page template:

<p>
<!--[if IE]>
According to the conditional comment this is Internet Explorer<br />
<![endif]-->
<!--[if IE 5]>
According to the conditional comment this is Internet Explorer 5<br />
<![endif]-->
<!--[if IE 5.0]>
According to the conditional comment this is Internet Explorer 5.0<br />
<![endif]-->
<!--[if IE 5.5]>
According to the conditional comment this is Internet Explorer 5.5<br />
<![endif]-->
<!--[if IE 6]>
According to the conditional comment this is Internet Explorer 6<br />
<![endif]-->
<!--[if IE 7]>
According to the conditional comment this is Internet Explorer 7<br />
<![endif]-->
<!--[if IE 8]>
According to the conditional comment this is Internet Explorer 8<br />
<![endif]-->
<!--[if gte IE 5]>
According to the conditional comment this is Internet Explorer 5 and up<br />
<![endif]-->
<!--[if lt IE 6]>
According to the conditional comment this is Internet Explorer lower than 6<br />
<![endif]-->
<!--[if lte IE 5.5]>
According to the conditional comment this is Internet Explorer lower or equal to 5.5<br />
<![endif]-->
<!--[if gt IE 6]>
According to the conditional comment this is Internet Explorer greater than 6<br />
<![endif]-->
<!--[if gt IE 7]>
According to the conditional comment this is Internet Explorer greater than 7<br />
<![endif]-->
</p>

and IE6 is reporting itself as being IE8! Makes writing the IE6-specific hacks CSS a little tricky... (although not impossible)

I tested Conditional Comments with Internet Explorer Collection installed and all versions worked correctly (exactly the same as their native versions).

You can use http://edskes.net/ieconditional.htm as Conditional Comments test website.

...not only why the options were greyed out, but also educated me about the option in IE8 to render using the IE7 engine (and not just in IE7 compatibility mode) under the "Developer Tools" menu.

Thanks so much for blogging this, I was about to be extremely frustrated.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.