0

I wanna know user's navigator name and alert it But Both in Firefox and Chrome the alert text is "Netscape" . Here is my javascript code :

var app=navigator.appName;
alert(app);

2 Answers2

0

You should be able to extract this information from navigator.userAgent instead. Check out this jsFiddle.

huysentruitw
  • 27,376
  • 9
  • 90
  • 133
0

The navigator object contains properties such as:

appCodeName
appName
appVersion
...
userAgent
vendor

and many others.

If you use chrome just type window.navigator in the console and you'll see all available fields.

Emil A.
  • 3,387
  • 4
  • 29
  • 46