Internet Explorer 7 Compatibility Mode

Well Internet Explorer 9 is finally here and we will now have to code for it. If you’re like me working in a production environment then most likely it is more of a hassle than a blessing since IE 6 through 9 are still out there.

The best practice is to code for the widest compatibility which, for internet explorer, is IE 7. I left out IE 6 since even Microsoft is trying to get rid of that albatross.

There is a piece of code you can add to your website to force later versions of Internet Explorer to only view the webpage as IE 7. It uses something called compatibility mode.

Internet Explorer 7 Compatibility Mode.

this is the code:

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

place this with the other meta tags in the HEAD of the web page.
If you want to test if the page is actually using the correct view mode type the following code into the address bar. (if you paste it some of the commands will disappear so watch for that.)


Posted by Jason McAlpin

Jason Mcalpin is a full stack developer and game designer. Jason has been programming for over 30 years from the days of punch cards and COBOL. Things have progressed since then and continue to move at a furious pace and Jason explores all of the latest trends in the field.