Select the product you need help with
How To Determine Browser Type in Server-Side Script Without the BrowserType ObjectArticle ID: 272413 - View products that this article applies to. This article was previously published under Q272413 SUMMARY
There are two common methods in server-side script to determine information about the browser that is being used by the client:
167820 IMPORTANT: The methods that are used in this article rely on the Web site receiving the correct "HTTP_USER_AGENT" string for browsers that connect to the site. Some proxy servers and browsers may send information that is incorrect or difficult to interpret. For example, the default HTTP_USER_AGENT string that Opera 5.12 returns is "Mozilla/4.0 (compatible; MSIE 5.0; <operating system>) Opera 5.12 [en]". This string is hard to interpret because the first portion of the string is the same as the string that Internet Explorer 5 returns.
(http://support.microsoft.com/kb/167820/EN-US/
)
How To Determine Browser Version from a Script
If you need to uniquely identify Internet Explorer version 5 or later (on Microsoft Win32 and Unix platforms only), use the isComponentInstalled or getComponentVersion methods of the CLIENTCAPS behavior. For information about these methods, see the following Microsoft Web sites: http://msdn2.microsoft.com/en-us/library/ms531357.aspx NOTE: These methods will fail if the client is not Internet Explorer 5 or later (Microsoft Win32 and Unix platforms only).
(http://msdn2.microsoft.com/en-us/library/ms531357.aspx)
http://msdn2.microsoft.com/en-us/library/ms531350.aspx
(http://msdn2.microsoft.com/en-us/library/ms531350.aspx)
MORE INFORMATION
The following sample code illustrates the use of Request.ServerVariables("HTTP_USER_AGENT"):
Here is a very brief sample of HTTP_USER_AGENT values:
Internet Explorer
- Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
- Mozilla/4.0 (compatible; MSIE 4.0 Crawler; Windows 95)
Netscape Navigator
- Mozilla/4.0b1 (Win95; I)
- Mozilla/3.01Gold (Macintosh; U; PPC)
http://www.cyscape.com/asp/browscap Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.
(http://www.cyscape.com/asp/browscap)
PropertiesArticle ID: 272413 - Last Review: August 9, 2007 - Revision: 1.5
| Article Translations
|


Back to the top








