Anatoly Lubarsky

Logo
MSSQL, .NET, Design. Life and Music

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>

Related Posts:

Tuesday, May 11, 2004 7:52 PM

Comments

# re: Javascript: connection type; clientCaps
hola me gusta el break dance y lo practico soy de peru y me gusta el break dance

7/9/2006 7:53 PM by jerry james

If your feedback doesn't appear right away, please be patient as it may take a few minutes to publish.

Post a Comment

Protected by CAPTCHAEnter the code you see
Name (*)  
E-mail (*)  
Url
Remember

Comment (*)