Obtain Browser Capabilities Using Javascript (clientCaps)
The ideal way to obtain client browser capabilities information is from a client-side script. This method minimizes server round trips, frees up server resources, and, consequently, boosts performance. It also provides information about browser settings and user preferences that cannot be obtained in any other way. Code snippet below demonstrates how to obtain browser capabilities using javascript. Specifically - how to obtain connection type (cables, dial-up, ADSL) in Internet Explorer.
< html> < head> < script> function my() { var sVersion = oClientCaps.connectionType; myText.innerHTML = "You are using " + sVersion; } < /script> < /head> < body style="behavior:url(#default#clientCaps)" id="oClientCaps" onLoad="my();"> < div id="myText">< /div> < /body> < /html>
Tuesday, May 11, 2004 7:52 PM