Yesterday I was doing a bunch of testing of a site that went live in the afternoon. Most of that testing involved making sure that there were no faux pas in the CSS that broke the display in Internet Explorer 6.
After spending so much time making sure that the design worked in Opera, Safari, Firefox 2 and 3, IE7 and IE8, I bregrudge running a virtual machine with IE6 in it to then break the design in every browser by making it work in IE6.
In my grumpiness along with vocalised thoughts of "why can't IE6 just go die quietly in a corner" and "I wish all IE6 users would get a life" I thought "why the hell can't Microsoft just make IE6 pretend to be IE7"
Now, as with all Microsoft products, all the settings are held in your windows registry, so as a distraction I went looking at the IE7/IE8 registry entries and comparing them to the one for IE6 in my VM. I couldn't believe what I found!!!
Under the "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\" registry key on Vista there's a "BrowserEmulation" key with a bunch of settings, including the "AllSitesCompatibilityMode", "IECompatVersionHigh" and so on.
To my amazement I found exactly the same set of registry entries in the VM running IE6!!!!
Before I go any further I should say THIS IS NOT FOR THE FAINT OF HEART! and BACK UP YOUR PC BEFORE YOU DO THIS!
First of all you need to set "MSCompatibilityMode" to "0y000000001".
The next bit is setting the high version you want the broswer to emulate. Now its not as simple as setting the high version to "0x0007000" as is the case of IE8 high compatibility version. What you need to do is set this to "0y6001.18000". This is actually part of the current IE7 version number. After the prerequiste Windows shutdown/restart, IE6 miraculously started displaying the site as IE7 would! I was amazed! I quite literally couldn't believe my eyes! I thought I would push my luck and try making IE6 pretend to be IE8, but that didn't work! In fact it made a bit of a mess of IE - thank goodness for registry backups!!
Here are some screen shots I took of the registry entries and before and after screen shots of IE6 and the web page source code.