Buy The Book
This example is posted here for the convenience of my readers.
Tip the Author
Found a helpful example, but don't own the book?
Advertising
Table of Examples

/**
 * browser.js: a simple client sniffer
 * 
 * This module defines an object named "browser" that is easier to use than
 * the "navigator" object.
 */
var browser = {
    version: parseInt(navigator.appVersion),
    isNetscape: navigator.appName.indexOf("Netscape") != -1, 
    isMicrosoft: navigator.appName.indexOf("Microsoft") != -1
};
Table of Examples