Browser Sniffer 1.0
- Demo: Note: In the download version is no alert.
- Browser: ie4+,n3+,n4+,n6,op5,op6
- Description:
Browser Sniffer 1.0 identifies different browsers by inquiring specific JavaScript objects (for instance: window.opera, window.netscape) and JavaScripts methods required for dynamic HTML (such as: document.getElementById, document.all).
Having run the function dhInit(), you may use the following variables:
- op.................Opera browser
- ie.................Internet Explorer
- n3.................Netscape 3
- n..................Netscape 4x
- n6.................Netscape 6
- dom................DOM Model
- dh................dynamic HTML
All these variables are boolean variables, in other words their value is 1 (true) or 0 (false).
For example: if(op) alert("You are using an Opera browser");
Only visitors using an Opera browser will see the alert.
To identify an:
Internet Explorer 4 use if(ie&&!dom)....
Internet Explorer 6 use if(ie&&dom)....
- Contributor: © 2002 Garfunkl
- Script-size: 0.6 kb
- uploaded: 05 11 02
- last modified: 05 11 02
|