IE5.5 Support

14 views
Skip to first unread message

Melvin

unread,
Aug 28, 2006, 2:22:39 PM8/28/06
to Google Web Toolkit
I know this has been discussed before and I did not see a conclusion.
Could anyone let me know if he/she tried to support IE5.5 and what is
the result? In our organization, IT has not migrate IE to 6. So we have
to support IE5.5.

Thank you very much for the help. This is really an urgent question for
me.

Melvin

calebri...@gmail.com

unread,
Aug 28, 2006, 4:51:01 PM8/28/06
to Google Web Toolkit
You can force GWT to treat IE 5.5 as IE 6 by putting the following in
your *.gwt.xml file:

<define-property name="user.agent"
values="ie6,moz,oldmoz,safari,opera"/>
<property-provider name="user.agent"><![CDATA[
var ua = navigator.userAgent.toLowerCase();
if (ua.indexOf("opera") != -1) {
return "opera";
}
else if (ua.indexOf("safari") != -1) {
return "safari";
}
else if ((ua.indexOf("msie 5.5") != -1) ||
(ua.indexOf("msie 6.0") != -1) ||
(ua.indexOf("msie 7.0") != -1)) {
return "ie6";
}
else if (ua.indexOf("mozilla") != -1) {
var geckoIdx = ua.indexOf("gecko/");
if (geckoIdx == -1)
return "oldmoz";

var spaceIdx = ua.indexOf(" ", geckoIdx);
if (spaceIdx == -1)
spaceIdx = ua.length;

var version = parseInt(ua.substring(geckoIdx + 6, spaceIdx));
if (version < 20051107) // Firefox1.5's Gecko version
return "oldmoz";
return "moz";
}
return "unknown";
]]></property-provider>

The kitchen sink demo works perfectly in IE 5.5, as do all AJAX tests I
have performed.

The only drawback I have experienced doing this is a serious one. IE
5.5 cannot be put into strict mode, so positioning and size methods on
widgets and in DOM.java will be inconsistent due to the different box
models. How big of a deal this is depends on your application.

Reply all
Reply to author
Forward
0 new messages