Internet Explorer Mini Site

Internet Explorer Mini Site

  1. Internet Explorer Landing Page
  2. Your Internet Explorer Version
  3. Internet Explorer Problems
  4. Internet Explorer Solutions
  5. Firefox for the Internet Explorer User
  6. Make Internet Explorer render XHTML
  7. Choosing a Browser
  8. Download a Browser
  9. Frequently Asked Questions
  10. How the Internet Explorer Landing Page works
  11. Valid Internet Explorer Conditional Comments

JavaScript-free

The Internet Explorer Version Detection Page is JavaScript-free. It does not use ActiveX. It does not use server-side scripting either. It is just a static web page. You get exactly the same page, regardless of whether you some browser or any version of Internet Explorer. The trick is that Internet Explorer does not render the page the same way that real browsers do.

the trick

detecting the Internet Explorer version

The Your Internet Explorer Version page show some informative text tailored to the specific version of Internet Explorer the visitor is using.
Users of older versions should be told to upgrade to the latest, more incapable and more secure version. However, they may be using the older versions because Microsoft does not provide the newer version for their older version of Windows. So, it would be nice to also give them some alternatives based on the system they may be using.

conditional comments

The version detection relies on Internet Explorer-specific behaviour, known as conditional comments. Internet Explorer allows the use of conditions in web pages. These conditions are not part of a web standard, but by hiding them in comments, real web browses won’t notice. Web browsers will simply ignore the comments, while Internet Explorer will act upon them.

recognising the Internet Explorer version

The Internet Explorer Landing shows different text for different versions of Internet Explorer.

The web server does not detect the browser you are using. All browsers and all versions of Internet explorer receive exactly the same page. Internet Explorer just processes it differently than web browsers.

The page does not detect the Internet Explorer version either. All versions of Internet explorer receive exactly the same page. Different versions of Internet Explorer just process it differently.

It is all done with Internet Explorer’s conditional comments.
Internet Explorer’s conditional comments do not just allow showing different content in Internet Explorer than in browsers, they also allows showing different content in different versions of Internet Explorer.

This skeleton of the Internet Explorer Version Detection page shows how it is done.

<!--[if IE]> <![if !IE]> <![endif]-->
<h2>You are not using Internet Explorer</h2>
<!--[if IE]> <![endif]> <![endif]-->

<!--[if gte IE 9]>
<h2>You are using Internet Explorer 9 or later.</h2>
<![endif]-->

<!--[if IE 8]>
<h2>You are using Internet Explorer 8.</h2>
<![endif]-->

<!--[if IE 7]>
<h2>You are using Internet Explorer 7.</h2>
<![endif]-->

<!--[if IE 6]>
<h2>You are using Internet Explorer 6.</h2>
<![endif]-->

<!--[if IE 5]>
<h2>You are using Internet Explorer 5.</h2>
<![endif]-->

Most web browsers interpret the page according to the standard. They will simply ignore all the HTML comments.

Internet Explorer does interpret the conditional comments. Each version of Internet Explorer will interpret the conditions as dictated by its own version. That is how each version ends up showing the text written for that version.

complex condition

The condition for the browser case looks considerably more complex than the one for the Internet Explorer case; Valid Internet Explorer Conditional Comments explains why this is so. All that matters here is that it works.

Internet Explorer Decision Page

The Internet Explorer Decision page uses the same technique, but works slightly differently. Before the introduction of Internet Explorer version 9, it looked like this.


<!--[if IE]> <![if !IE]> <![endif]-->
<h2>You are not using Internet Explorer</h2>
<p>Probably using a web browser, it will load the home page.<p>
<!--[if IE]> <![endif]> <![endif]-->

<!--[if IE]>
<h2>You are using Internet Explorer.</h2>
<p>Not using a web browser, IE will load the Internet Explorer Landing Page.</p>
<![endif]-->

Microsoft's Internet Explorer version 9 finally supports all major web standards.
The Internet Explorer Decision Page now looks like this.


<!--[if IE]> <![if !IE]> <![endif]-->
<h2>You are not using Internet Explorer</h2>
<p>Probably using a web browser, it will load the home page.<p>
<!--[if IE]> <![endif]> <![endif]-->

<!--[if gte IE 9]>
<h2>You are using Internet Explorer 9 or later.</h2>
<p>That is a web browser, it will load the home page.</p>
<![endif]-->

<!--[if lt IE 9]>
<h2>You are using Internet Explorer 8 or earlier.</h2>
<p>Not using a web browser, it will load the Internet Explorer Landing Page.</p>
<![endif]-->

Together, these three conditions cover all cases. The first previews of Internet Explorer 9 have various limitations, that is why, although it technically supports XHTML, it still cannot handle this site. The detection code does not bother to test for this particular version; anyone who still uses that early release knows that they can expect to encounter problems, and probably wants to try it on the main site. The Second Internet Explorer 9 Platform Preview, released on 2010 May 5 is still awkward to use, but is good enough to render the main site.

How the Internet Explorer Landing Page works explains how the conditional comments are combined with a so-called meta refresh command to make your browser choose either the home page or the Internet Explorer Landing Page.

limitation

The conditional comments technique has one important limitation. Conditional comments were introduced with Internet Explorer 5, so Internet Explorer 4 and earlier do not support it. This limitation is a fairly theoretical issue, not only because almost no one uses Internet Explorer 4 anymore, but also because anyone who is still using it cannot help but be aware that it has serious limitations.