Html – Testing IE7 & IE8 using IE9 developer tools – Right document mode to replicate the old versions

htmlinternet explorer

I'm building a site with HTML5 elements and would just prefer it if previous versions of IE would play along, so i'm using the HTML5shim javascript from googlecode.

The only way I have to test IE7 and IE8 is to use the developer tools on IE9 to switch the browser mode and document mode.

Even using the shim, if I select IE7 or IE8 browser mode and their relevant standards mode, the document is pretty far gone – HTML5 elements do not behave like div's (i'm under the impression that shim replaces all the new elements with divs).

If I select quirks mode for the IE7 and IE8, the site looks more or less how it should, which gives me hope that I can fix any remaining issues without having to resort to stripping out HTML5 elements.

So if you're using IE7 or IE8 with a HTML5 doctype, would they run in quirks or standards?

Also, can I trust that what i'm seeing in IE9 emulating the old versions is what a user of the older browsers would actually see?

Best Answer

i'm going to stick out my neck and say NO. you can’t trust IE9 emulating old versions.

I’ve recently ran into some issues regarding IE9 emulating IE8 using X-UA-Compatible IE=EmulateIE8 to force IE8 rendering via IIS. I must say everything was fine until i upgraded to Jquery 1.6.1 from Jquery 1.4.3. I started getting some wierd issues with Jquery selecting DOM objects using $("#myObject");

but visually everything looks fine tho but there's something not well with IE9's DOM. before upgrading to IE9 all worked fine, maybe the test would be to downgrade to IE8 again test if Jquery 1.6.1 works. but from my experience i dont think you can trust IE9 emulating old browsers, best thing is to setup a VM with old browsers that will give you better results. i'm going to do that, rather use VM with old browser (IE8).

Update

I went the VM route way, much easier to test IE8 that way, so all I did was setup a VM with IE8 installed.

Related Topic