Using Internet Explorer 8 for IE6 and IE7 testing

Posted on October 02, 2009

I personally don’t care what my websites look like in IE6 or 7 (or 8) but for those who do there is neat little trick to test your site for these browsers.

The hard way

If you’re on Windows XP or older you can use a standalone version of IE6. If you’re on Windows 7 (not the beta though), you can use Microsoft’s free “IE Application Compatibility VPC Image” to run XP with IE6 or 7 in a virtual machine. If you’re on any other operating system (Windows Vista, Mac OS, Linux) and have a Windows XP license you can run it using a VM like VirtualBox.

The easy way

If you’re already running IE8 there is an easier way. Compatibility View will render pages as IE7, and a missing doctype will cause pages to be rendered as IE6 in quirks mode.

You can simply remove the doctype from your pages when you’re testing for IE6 or ― if you’re using PHP ― add a simple switch:

1
2
3
4
<?php if ( !isset($_GET['ie6']) ): ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
strict.dtd">
<?php endif ?>

Now you can simply add “?ie6” to the URL in IE8 to see what your page looks like in IE6. You can even keep several tabs open to make sure it works with all versions.

Scroll to top

Comments (7)

  • Despite spending what seems like half my professional life dealing with IE compatibility issues, I still wouldn't call myself an expert — however there are a couple of (by no means authoritative) concerns I have over this…

    1) If you are going to go about this process to cater for IE6 and you can only cater for IE6 quirks mode, then surely you need to force quirks mode not just for yourself but also for the user? Perhaps by extending the if condition to something like: !isset($_GET['ie6']) && !(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.') … ?

    2) It's important to remember that rendering is just rendering and other inconsistencies that are often lumped in to the same bag of bugs can be down to scripting — which even in compatibility mode will be that of IE8.

    3) I still prefer your IE6ification bookmarklet. Especially for showcasing to clients. :)

    Posted by Barney on October 02, 2009 Reply

  • Re 1: From my understanding a website will look identical in IE8 in quirks mode and IE6 not in quirks mode. I'm not sure if it's exactly the same but from what I've seen it comes at least very close.

    Re 2: Good point, I guess if IE6 support is really important then you should just run IE6 in a VM to be sure.

    Re 3: It's for their own good. :)

    Posted by ElbertF on October 02, 2009 Reply

  • thx for the tip! IE6 must EOL but most inhouse corporate application are developed to work with IE6 - IE6 is tough to kill

    Posted by nileshbabu on October 06, 2009 Reply

  • I translated your article into Russian and published it here with a link to the source. thanks :)

    Posted by contorra on November 14, 2009 Reply

  • No problem Aleks, thanks for the link.

    Posted by ElbertF on November 14, 2009 Reply

  • I translated your article into Russian and published it here with a link to the source. thanks :)

    Posted by contorra on November 14, 2009 Reply

  • No problem Aleks, thanks for the link.

    Posted by ElbertF on November 14, 2009 Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

Fork me on GitHub