Browser Detection In JavaScript

We can Detect the visitor's browser with the help of Navigator Object In JavaScript.
Ex:
  1. <html>
  2. <body>
  3. <div id="browserdetection"></div>
  4. <script type="text/javascript">
  5. x = "<p>Browser CodeName: " + navigator.appCodeName + "</p>";
  6. x += "<p>Browser Name: " + navigator.appName + "</p>";
  7. x += "<p>Cookies Enabled: " + navigator.cookieEnabled + "</p>";
  8. x += "<p>Browser Version: " + navigator.appVersion + "</p>";
  9. document.getElementById("browserdetection").innerHTML = x;
  10. </script>
  11. </body>
  12. </html>
Output:
juhi.png