Javascript Reference - Navigator product Property








The product property returns the engine name of the browser.

Browser Support

product Yes No Yes Yes No

Syntax

var v = navigator.product

Return Value

Type Description
String engine name of the browser




Example

A demonstration of all navigator properties.


<!DOCTYPE html>
<html>
<body>
<!--   www . ja  v a 2  s.  c o  m-->
<div id="demo"></div>

<script>
txt = "<p>Browser CodeName: " + navigator.appCodeName + "</p>";
txt+= "<p>Browser Name: " + navigator.appName + "</p>";
txt+= "<p>Browser Version: " + navigator.appVersion + "</p>";
txt+= "<p>Cookies Enabled: " + navigator.cookieEnabled + "</p>";
txt+= "<p>Browser Language: " + navigator.language + "</p>";
txt+= "<p>Browser Online: " + navigator.onLine + "</p>";
txt+= "<p>Platform: " + navigator.platform + "</p>";
txt+= "<p>User-agent header: " + navigator.userAgent + "</p>";
txt+= "<p>User-agent language: " + navigator.systemLanguage + "</p>";

document.getElementById("demo").innerHTML = txt;
</script>

</body>
</html>

The code above is rendered as follows:





Example 2

The following code shows how to get the browser's engine name.


<!DOCTYPE html>
<html>
<body>
<button onclick="myFunction()">test</button>
<!--from   w w w. ja  v  a 2 s  .c  om-->
<p id="demo"></p>

<script>
function myFunction() {
    var x = "Browser's Engine Name: " + navigator.product;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

The code above is rendered as follows: