Posted by Mattias Sandström on March 22, 2009
DevBlog Teaser
This week Microsoft decided to release IE8 in a final version. As we had noticed incompatibilities with version 1.1.x with RC1 of IE8 we expected to have our work cut out for us for the weekend. (We tried upgrading Dojo to version 1.2 when the Dojo framework was released and got all kinds of problems and simply reverted back to the old version...)
Luckily I listened to Paul Thurrott’s and Leo Laporte’s Windows Weekly podcast (http://twit.tv/ww episode 98) and the Compatibility View option in IE8 came to my attention and I started looking around the ‘net for more information about this.
What is the Compatibility View? In Internet Explorer 8, there is two options in the Tools menu to configure if IE8 should behave like IE7...

This is great news as most pages and sites probably haven’t adjusted their pages for IE8. This is also bad news for IE8 since site and content owners do not have to adjust their sites! Your site could simply request to be displayed in Compatibility View in IE8 and you are good to go!
IE8 contains a dynamic Compatibility List of sites that have been identified (by the users - sic!) to be displayed in compatibility mode. Downloading this list from Microsoft I found that our sites were not listed (I guess to few visitors) but it was interesting to see how many sites (actually domains) that were listed. One option would be to run IE8 access our web-sites and request (from IE8) that they should be using the Compatibility View. This would work for the public systems, but how about in-house systems?
Digging deeper I found additional information that you could add a special META-tag to your pages to force IE8 to go into Compatibility View! Wow, talk about an easy way to avoid people adjusting their pages for IE8. This line of code saved my weekend:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
Adding this to the HEAD section and we are done! Dojo 1.1.x works and the pages render correctly (including the menus on the web-pages)! Instead of spending hours trying to figure out why the Dojo 1.1.x to 1.2.x upgrade was not a plug-and-play, I can now enjoy the first days of spring in Sweden...
Reading further down the MSDN article about the compatibility mode, I am amazed to find that Microsoft in its infinite wisdom added a way to disable this function in IE8 by adding a special registry key to each client’s computer - wow! At the same time they added functions in IIS to enable Compatibility View easily across your sites....
MSDN link: http://msdn.microsoft.com/en-us/library/cc288325(VS.85).aspx
--Mattias Sandström
Copyright © 2005-2012 Tangix Design & Development. All rights reserved