/ Published in: JavaScript
Expand |
Embed | Plain Text
// Internet Explorer 6 var IE6 = false /*@cc_on || @_jscript_version < 5.7 @*/; // exactly Internet Explorer 7 var IE7 = false /*@cc_on || @_jscript_version == 5.7 @*/; // at least Internet Explorer 7 var gteIE7 = false /*@cc_on || @_jscript_version >= 5.7 @*/; // any Internet Explorer (thanks to Dean) var isMSIE = /*@cc_on!@*/false;
Comments
Subscribe to comments
You need to login to post a comment.

When SP3 rolled out for Windows XP, all users running IE6 were upgraded to JScript 5.7.
The following is still valid:
var isMSIE = /@cc_on!@/false;A SitePoint forum post, "Good way to detect IE6 but not IE7 using object detection?", lists some other ways to detect IE6.
Props to the following articles for helping me make sense of this: 1, 2, 3
Whoops, I didn't link to the forum post, Good way to detect IE6 but not IE7 using object detection?
Whoops, I didn't link to the forum post, Good way to detect IE6 but not IE7 using object detection?