JavaScript  -  Web Browser Name

Multi-engine browsers will return the browser name for the layout/rendering engine in use at the time, as per the utilized userAgent string, and not the developer's name; e.g., Avant, or Lunascape.

Also, remember to order your search list in such a way as to accommodate the userAgent strings; e.g., if Chrome or Maxthon were to be listed before Safari, the userAgent search would return the name Safari for those browsers.

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

<script type="text/javascript">
var uA1 = navigator.userAgent.toLowerCase ();
var browserName1 = navigator.appName;
if (uA1.search ("avant") >-1) browserName1 = "Avant";
if (uA1.search ("msie") >-1) browserName1 = "Internet Explorer";
if (uA1.search ("k-meleon") >-1) browserName1 = "K-Meleon";
if (uA1.search ("konqueror") >-1) browserName1 = "Konqueror";
if (uA1.search ("lunascape") >-1) browserName1 = "Lunascape";
if (uA1.search ("firefox") >-1) browserName1 = "Firefox";
if (uA1.search ("opera") >-1) browserName1 = "Opera";
if (uA1.search ("safari") >-1) browserName1 = "Safari";
if (uA1.search ("chrome") >-1) browserName1 = "Chrome";
if (uA1.search ("maxthon") >-1) browserName1 = "Maxthon";
if (uA1.search ("seamonkey") >-1) browserName1 = "SeaMonkey";
else browserName1 = browserName1;
</script>

and use this script in the <body>

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

Web Browser Name - Displays:

 

Option 2.   Save this script in your js folder

Save the following script as browsername.js

<!--
var uA2 = navigator.userAgent.toLowerCase ();
var browserName2 = navigator.appName;
if (uA2.search ("avant") >-1) browserName2 = "Avant";
if (uA2.search ("msie") >-1) browserName2 = "Internet Explorer";
if (uA2.search ("k-meleon") >-1) browserName2 = "K-Meleon";
if (uA2.search ("konqueror") >-1) browserName2 = "Konqueror";
if (uA2.search ("lunascape") >-1) browserName2 = "Lunascape";
if (uA2.search ("firefox") >-1) browserName2 = "Firefox";
if (uA2.search ("opera") >-1) browserName2 = "Opera";
if (uA2.search ("safari") >-1) browserName2 = "Safari";
if (uA2.search ("chrome") >-1) browserName2 = "Chrome";
if (uA2.search ("maxthon") >-1) browserName2 = "Maxthon";
if (uA2.search ("seamonkey") >-1) browserName2 = "SeaMonkey";
else browserName2 = browserName2;
document.write(""+browserName2+"");
//-->

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

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

Web Browser Name - Displays:

 

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

<script type="text/javascript">
<!--
var uA3 = navigator.userAgent.toLowerCase ();
var browserName3 = navigator.appName;
if (uA3.search ("avant") >-1) browserName3 = "Avant";
if (uA3.search ("msie") >-1) browserName3 = "Internet Explorer";
if (uA3.search ("k-meleon") >-1) browserName3 = "K-Meleon";
if (uA3.search ("konqueror") >-1) browserName3 = "Konqueror";
if (uA3.search ("lunascape") >-1) browserName3 = "Lunascape";
if (uA3.search ("firefox") >-1) browserName3 = "Firefox";
if (uA3.search ("opera") >-1) browserName3 = "Opera";
if (uA3.search ("safari") >-1) browserName3 = "Safari";
if (uA3.search ("chrome") >-1) browserName3 = "Chrome";
if (uA3.search ("maxthon") >-1) browserName3 = "Maxthon";
if (uA3.search ("seamonkey") >-1) browserName3 = "SeaMonkey";
else browserName3 = browserName3;
document.write(""+browserName3+"");
//-->
</script>

Web Browser Name - Displays:

 

A web browser is a software application for retrieving, presenting, and traversing information resources on the World Wide Web. An information resource is identified by a Uniform Resource Identifier (URI) and may be a web page, image, video, or other piece of content. Hyperlinks present in resources enable users easily to navigate their browsers to related resources. A web browser can also be defined as an application software or program designed to enable users to access, retrieve and view documents and other resources on the Internet. Although browsers are primarily intended to access the World Wide Web, they can also be used to access information provided by web servers in private networks or files in file systems. The major web browsers are Firefox, Google Chrome, Internet Explorer, Opera, and Safari.