The Navigator object contains information about the visitor's browser.
Browser Detection
Almost everything in this tutorial works on all JavaScript-enabled browsers. However, there are some things that
just don't work on certain browsers - especially on older browsers.
Sometimes it can be useful to detect the visitor's browser, and then serve the appropriate information.
The Navigator object contains information about the visitor's browser name, version, and more.
Note: There is no public standard that applies to the navigator object, but all major browsers support it.
The Navigator Object
The Navigator object contains all information about the visitor's browser:
Example
|
*/
The output will be
Browser CodeName: Mozilla
Browser Name: Netscape
Browser Version: 5.0 (Windows; en-US)
Cookies Enabled: true
Platform: Win32
User-agent header: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13)
Gecko/20101203 Firefox/3.6.13 (.NET CLR 3.5.30729)
No comments :
Post a Comment