Click here to Skip to main content
15,891,513 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Experts,
I am not able to get exact browser name from some browsers in mac. I am getting browser name like below.
"
[FBAN/MessengerForiOS;FBAV/147.0.0.50.87;FBBV/84235609;FBDV/iPhone8,2;FBMD/iPhone;FBSN/iOS;FBSV/11.2.1;FBSS/3;FBCR/T-Mobile;FBID/phone;F
"
Can any one please help me how to get the exact browser name?
Thanks in advance.

What I have tried:

I tried with below code for getting browser name
var Browsername = navigator.appCodeName;
var Browsername = navigator.appName;
When i used this code the browser name returns like above.
Posted
Updated 9-Jan-18 2:43am
Comments
Peter_in_2780 9-Jan-18 0:59am    
Are you looking for navigator.userAgent ? That is what the browser will send to a host to identify itself.

1 solution

Check this link: JavaScript Window Navigator[^]

It will show you how to get all the information available to you via JavaScript and also will show you how untrustworthy that info is...
For instance 'Netscape' is the application name fro IE11, Chorme and Firefox...
Or 'Mozilla' is the application code name for IE, Chrome, Firefox...

So not getting the browser name is not your fault, the question is why in the first place you looked for it?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900