Monday, February 6, 2012

how to sniff browser specifications with JavaScript

http://www.w3schools.com/js/js_browser.asp taught me that I may sniff my browser's specifications with JavaScript like so:

<div id="badbrowserspecifications"></div>

<script type="text/javascript">

   var txt = "<p>The browser you are using: " + navigator.appName + "<br />";

   txt += "...codenamed " + navigator.appCodeName;

   txt += " and versioned at: " + navigator.appVersion + "</br>";

   txt += "......is insufficient for our application.</p>";

   document.getElementById("badbrowserspecifications").innerHTML = txt;

</script>

No comments:

Post a Comment