WebSpeed
Product Update Bulletin
Browser Detection
The following JavaScript code snippet contains a simple method for determining whether a browser is Internet Explorer or Netscape Navigator. It tests for the existence of the document.all object, which is only available on Internet Explorer. Then it tests for the existence of the document.layers object, which is only available on Netscape Navigator:
An alternative method for browser detection is to use SpeedScript to create a test in your WebSpeed web object which, of course, runs on the server side. The following test, written in SpeedScript, checks for the value of the CGI environment variable, HTTP_USER_AGENT:
CGI environment variables are set automatically when web requests are received by a WebSpeed agent. In this case, if the value of HTTP_USER_AGENT is MSIE, then the client request came from an Internet Explorer Web browser.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |