45
If ActiveXObject exists and XMLHttpRequest does not, it's IE6:
/* IE6 Check */
(!!window.ActiveXObject && !window.XMLHttpRequest) ? true : false;
In IE7, it would be:
(!!window.ActiveXObject && !!window.XMLHttpRequest) ? true: false;
References
Just to let people know $.browser.msie && /6.0/.test(navigator.userAgent) is not reliable, I've come to this question looking for an answer to a problem with the JQuery bgiframe which breaks on my machine because I have 'Media Center PC 6.0' in my navigator.userAgent string. I've now edited the source to use the $browser.version test.
Its silly of JQuery to deprecate these browser tests because ugly as they may be they are necessary to deal with the ugly state of the browser ecosystem.