Wednesday, February 15, 2012

ASP.Net Browser Detection

If you are using a version of ASP.Net older than ASP.Net 4, chances are that your browser detection for browsers such as Google Chrome is not accurate.  Effectively, in ASP.Net 3.5 and earlier, Google Chrome is detected as AppleMAC-Safari which makes it virtually indistinguishable from Apple's own Safari browser.

Fortunately, in ASP.Net 4, this has been remedied.  If you use the Request.Browser properties to detect differences between Google Chrome and Apple Safari, you can accurately detect the differences and correct version numbers.

If you would like to incorporate the new ASP.Net 4 browser definition files into your own ASP.Net 3.5 application, you can get these files from here: http://aspnet.codeplex.com/releases/view/41420 

No comments:

Post a Comment