JavaScript  -  Web Browser Compatibility

Option 1.   Place this script in the <head> of your html document

<script type="text/javascript">
var compName1 = navigator.appName;
</script>

and use this script in the <body>

<script type="text/javascript">
<!--
document.write(""+compName1+"");
//-->
</script>

Web Browser Compatibility - Displays:

 

Option 2.   Save this script in your js folder

Save the following script as compatibilty.js

<!--
var compName2 = navigator.appName;
document.write(""+compName2+"");
// or
// document.write(""+navigator.appName+"");
// without variable
//-->

and refer to it in the <body> of your html document

<script src="/js/compatibility.js" type="text/javascript"></script>

Web Browser Compatibility - Displays:

 

Option 3.   Embed this script in the <body> of your html document

<script type="text/javascript">
<!--
var compName3 = navigator.appName;
document.write(""+compName3+"");
// or
// document.write(""+navigator.appName+"");
// without variable
//-->
</script>

Browser Compatibility - Displays:

 

Your web browser is a translation device. It takes a document written in the HyperText Markup Language (HTML) and translates it into a formatted webpage. The result of this translation is a little like giving two human translators a sentence written in French and asking them to translate it into English; both will get the meaning across, but may not use the same words to do so. The basic rules for translating HTML documents are established by the World Wide Web Consortium (W3C), which publishes the official HTML standards, but there's considerable room for interpretation within those ground rules. The major difference between two versions of the same browser is their support for newer portions of the HTML standards. A newer web browser is generally better at displaying webpages than an older one.