- The BrowserType object
- The Request.ServerVariables("HTTP_USER_AGENT") method
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:
UserAgent = Request.ServerVariables("HTTP_USER_AGENT")
Response.Write "<p>" & UserAgent & "</p>"
if instr(1,UserAgent,"MSIE") > 0 then
Response.Write "Browser is Internet Explorer"
if instr(1,UserAgent,"MSPIE") > 0 then
Response.Write "Browser is Pocket Internet Explorer"
Response.Write "Browser is not Internet Explorer"
Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)
Browser is Internet Explorer
Here is a very brief sample of HTTP_USER_AGENT values:
To see samples of possible strings, search on your hard disk for a file named Browscap.ini, and open it in NotePad. Browscap.ini contains a list of values for Internet Explorer and Netscape Navigator, as well as browsers from Oracle and Opera. You can also download the most recent version of Browscap.ini from the following cyScape Web site:
- Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
- Mozilla/4.0 (compatible; MSIE 4.0 Crawler; Windows 95)
- Mozilla/4.0b1 (Win95; I)
- Mozilla/3.01Gold (Macintosh; U; PPC)
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.
Article ID: 272413 - Last Review: Mar 17, 2009 - Revision: 1