Showing posts with label IE7. Show all posts
Showing posts with label IE7. Show all posts

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.

Tuesday, March 1, 2011

JavaScript 纠错

用 jQuery 有一段时间了,一直是用 Firefox 做开发环境,一个重要的原因就是因为 Firebug 这个好工具。但是有时候 JavaScript 在 IE 里面会出现一些奇妙的错误,有些时候这些错误还不是很容易重复。或许还是我太懒,一直用 Firefox 顺手,所以有成见。不过有这种成见的似乎不只我一个。

言归正传,今天有遇到一位只用 IE 的同事 -- 因为在医院做技术支持,机器上一般都只有 IE -- 用我的 portman 工具时遇到问题。于是就搜了一下 "Firebug IE7",找到这篇文章《Firebug in IE for *any* web site》,顺藤摸瓜回到 Firebug Lite,文中的主意似乎已经被吸纳到“正版”里了,现在只要直接在 IE 里面加一个书签就行。

这么现成的工具,以前居然一无所知。