Emulating Old IE Versions for Testing Using Meta tag

Making your website work for all different kind of browser is a lot of work. It looks easy but there are hundreds of things that you have to keep in mind when you design your website because you never know what kind of browser your user is going to end up using. On the top of that different IE versions create a whole another issue and because things are different in different version of IE it's difficult to predict as what and what not is going to work. So here is a little tip to test your website's compatibility among different browser versions of IE.

We will make use of HTML's Meta tag to emulate browser type.


<meta http-equiv="X-UA-Compatible" content="IE=Edge" />


I have "IE=Edge" listed there because that tells browser "use what you have as highest version available". You can change this to IE v 5:

<meta http-equiv="X-UA-Compatible" content="IE=5" />


IE v 6 (essentially there was not much difference between v5 and v6 of IE so what work in 5 will work on 6)

IE v 7:

<meta http-equiv="X-UA-Compatible" content="IE=7" />


IE v 8:

<meta http-equiv="X-UA-Compatible" content="IE=8" />


IE v 9:

<meta http-equiv="X-UA-Compatible" content="IE=9" />


Note: this is just to test browser compatibility and not recommended to use in production environment.