• Home
  • Flailing Wildly
  • Résumé
  • Design
  • Code
  • Wishlist
  • About Me

Flailing Wildly
Too much straw, not enough camel.

Conditional Comments in Standalone Internet Explorer

by Ryan Parman • January 9, 2005 • Browsers, Code, Software • No comments

This was written by Manfred Staudinger from Vienna, Austria

With a small, one-time change, Conditional Comments will work again and recognize the values 5.0 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!

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 Conditional Comments!

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.

For example the following CC’s will work even with multiple IE’s installed:

  1. “if IE 6” or “if IE 6.0” — for use with IE 6.0
  2. “if IE 5” or “if lte IE 5.5” — for use with IE 5.01 and 5.5
  3. “if IE 5.0” — for use with IE 5.01
  4. “if gte IE 5.5” — for use with IE 5.5 and 6.0
  5. “if IE” or “if lte IE 6.0” — for use with IE 5.01, 5.5, and 6.0

This CC will still not work when multiple IE’s are installed:

  1. “if IE 5.5” — for use with IE 5.5

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.

You can discuss this further at the Skyzyx Support Forums.

Ryan Parman

Ryan Parman is an entrepreneur, open source evangelist and passionate usability advocate currently living in Seattle. He is the founder and visionary behind SimplePie and CloudFusion, co-founder of WarpShare, member of the RSS Advisory Board, and creator of the AWS SDK for PHP. Ryan's aptly-named blog, Flailing Wildly, is where he writes about ideas longer than 140 characters.

« Happiness Is…
Do Not Eat iPod shuffle »

Comments for this post are now closed.

Blog search

Archives
  • 2016 (1)
  • 2015 (3)
  • 2014 (6)
  • 2013 (15)
  • 2012 (16)
  • 2011 (27)
  • 2010 (9)
  • 2009 (6)
  • 2008 (12)
  • 2007 (8)
  • 2006 (18)
  • 2005 (57)
  • 2004 (104)
  • 2003 (103)
Categories
  • Apple (62)
  • Browsers (56)
  • Cloud Computing (5)
  • Clueless Recruiters (9)
  • Code (60)
  • Community (2)
  • Creating Websites (32)
  • Culture (8)
  • Design (7)
  • Digital Media (9)
  • Family Life (12)
  • Just for Fun (27)
  • Law (2)
  • Life Lessons (2)
  • Music (5)
  • Notable Quotes (1)
  • Passwords (4)
  • Personal (41)
  • Political (17)
  • Projects (49)
  • Security (6)
  • Software (69)
  • Syndication (28)
  • Technology (92)
  • The Hiring Process (1)
  • Tutorials (9)
  • TV and Movies (17)
  • Video Games (6)
  • Website (62)
  • Work and Business (8)
  • Writing (4)
Socially-aware

Twitter • Facebook • YouTube • Yelp! • Flickr • Instagram • Zerply • LinkedIn • Last.fm • Spotify • Rdio • Pinboard • gdgt

Claim to fame
  • Amazon Web Services
  • WarpShare
  • CloudFusion
  • SimplePie
Legal mumbo-jumbo

All ideas, opinions and comments I post are my own and are in no way affiliated with anybody I work with. If you quote and/or reprint something I've written or said, please direct folks back to this site as a form of attribution. I promise I'll do the same for you. Unless otherwise noted, all content on this site is copyright © 1979–2011 Ryan Parman.

Powered by Rocket Sauce. A Ryan Parman production.