Blog du Tristank

So terrific that 3 of 4 readers rated it "soporific"

XPSP2: How To Detect IE6 for SP2

A quick note that’s becoming something of an internal FAQ – the information below is from MSDN.

Detecting Internet Explorer in SP2
You can use window.navigator.userAgent to detect if the browser connecting to your site is Internet Explorer in SP2.
var g_fIsSP2 = false;
function browserVersion()
{
  g_fIsSP2 = (window.navigator.userAgent.indexOf(“SV1”) != -1);
  if (g_fIsSP2)
    {
      //This browser is Internet Explorer in SP2.
    }
  else
    {
      //This browser is not Internet Explorer in SP2.
    }
}

If the user agent string contains “SV1”, the browser connecting to your site is Internet Explorer in SP2.

Pasted from <http://msdn.microsoft.com/security/default.aspx?pull=/library/en-us/dnwxp/html/xpsp2web.asp>

An example SP2 user-agent string looks like this: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)