Monday, November 12, 2012

Sharing the Pain from IE

I just complained to a colleague, after he spent some time helping me with an issue in Microsoft Internet Explorer 8, that Microsoft wanted to conquer the world. They did it, but with whole truck loads of manure, piled up high in everybody's backyard. Now we are left to clean up all that smelly stuff.

The issue is that, the hospital has some legacy applications that run only on IE. We finally got to IE8 not too long ago after a relatively brief encounter with IE7, which was after a long tiring adventure with IE6. But some applications still require IE7. So the standard issue browser on everyone's desktop is IE8 running in IE7 compatibility mode. Web based applications that I have worked on usually are used by technical people so I usually could care less if something works in IE or not.

The latest project involves a dashboard for the non-techies, including executives, which means we are not allowed to bring a tool not sanctioned by the enterprise, such as Firefox. Fortunately, we have another colleague who has dealt with IE quite extensively. He provided information that was priceless to us, with a caveat: The tricks he gave us may or may not work. At least he had not been able to get them all to work.

The one trick is to force IE8 to render HTML as IE8, rather than in IE7 compatibility mode. There are three ways to do that:
  1. Change Compatibility View Settings in IE8: That function is listed in Tools menu. One just needs to check off the Display Intranet sites in Compatibility View.
  2. Add a meta tag in the HTML document head part:
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
  3. Add an item in the HTTP response header: x-ua-compatible: IE=Edge
#1 is a non-starter because it requires manually configuring the browser.

#2 worked for my colleague right away in one of his applications. So he gave me the information to try out in my code.

It didn't work!

After a number of frustrating trials, every single time clearing IE8 cache, closing the browser, open the browser again and checking the rendering mode, etc., with no luck whatsoever, we decided to try #3.

That worked.

At this point, I am too lazy to bother with the changes in previous trials. So I still don't know if #3 alone or the a combination of #2 and #3 made it work. I am just glad that it works.

No comments:

Post a Comment