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);
CLONER
  • 23
  • 5

2 Answers2

0

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

huysentruitw
  • 26,177
  • 9
  • 85
  • 125
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,307
  • 4
  • 27
  • 45