This JavaScript code does a great job of displaying information about your web browser. Information includes Browser Name, Version, your computer’s OS platform, and whether Java is enabled. This also shows how many pages you’ve visited and screen resolution.

This helps you not rely on any JavaScript Frameworks to get browser details such as JQuery.browser or others. Someone at StackOverFlow wrote an excellent script to detect the browser using the duck-typing method.