labs.insert-title.com

Conditional Comments

A Guest Article by Manfred Staudinger

With a small one time change CC will work again and recognize the values 5, 5.0, 6 and 6.0, again; however, it will not recognize 5.5.

How is it done? Go to the registry and look in HKLM\Software\Microsoft\Internet Explorer\Version Vector\ for the key "IE". Simply get rid of it by renaming it to "zIE" - that's it!

You can test it yourself or by using this small piece of html: http://staudinger.heim.at/Test/cond_0.html

Versions of version: technical information.

As I had installed IE 6.0, I looked into the registry for its version number "6.0.2800.1106" and found 7 entries in HKLM, 3 of them belonging to the key "Internet Explorer": Wizard Version, Version and Build.

I looked also into the module iexplore.exe and found this information 4 times. All these 11 occurrences appear to be character data with minor variations in format, but no one was compatible with the design for the CC!

So to meet the specifications, a new structure was created, the "Version Vector". IE reads the information (currently 5.0002, 5.5000, or 6.0000) from there when it is started: if the program cannot find it, it gets the information from the module. This also means that IE has to be closed and restarted to get the change. Now in case of IE 5.5 we can see the incompatibility which forced the creation of a new structure: CC gives true for "gte IE 5.999" and "lte IE 5.9990"! As CC cannot be nested there is no way to identify IE 5.5 properly. To see this run the above mentioned test. For better understanding CC you might want to read About Conditional Comments

I have tested quite a lot on my Win98, but as the whole structure was build exclusively for CC, I would expect no real problems with later versions.

Works on windows 2003 and XP (SP1) as well, hoping to hear from other testers soon!





Discussion

mike

I am running xp pro 64-bit and it comes stock with two IEs. a 64-bit version and a 32-bit version.

How can I disable one of them? the 64-bit version is causing me troubles, I think, as Windows uses it by default. I cannot make my mail client "outlook" in the 64-bit version, only the 32-bit version.

any ideas how to specify which IE my system uses?

Manfred

The URI for my test has changed, but the test has become even better and includes IE 7.0.

Carson

thanks for really good website!

tovorinok

Hi Great book. I just want to say what a fantastic thing you are doing! Good luck! Bye

New comments are currently disabled, you can find me @joemaddalone Comments temporarily disabled for now, you can find me @joemaddalone