最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

(Javascript) List of "navigator.appName" values for all browsers? - Stack Overflow

programmeradmin2浏览0评论

What values are returned for navigator.appName values for all common browsers?

The navigator.appName value for Firefox is Netscape.

What values are returned for IE, Firefox, Google Chrome, Safari, Opera, Flock, etc.?

What values are returned for navigator.appName values for all common browsers?

The navigator.appName value for Firefox is Netscape.

What values are returned for IE, Firefox, Google Chrome, Safari, Opera, Flock, etc.?

Share Improve this question edited Sep 17, 2014 at 15:43 p.campbell 101k70 gold badges262 silver badges326 bronze badges asked Nov 11, 2011 at 19:19 夏期劇場夏期劇場 18.3k46 gold badges140 silver badges225 bronze badges 7
  • 2 It's also "Netscape" for Chrome and Safari, probably other browsers too. So it's probably not the most useful property? – Matt Greer Commented Nov 11, 2011 at 19:23
  • And Chromium (14) (perhaps obviously) on Ubuntu 11.04. – David Thomas Commented Nov 11, 2011 at 19:27
  • What??? My god, why??? So, what the navigator.appName is using for? (or) just useless property? – 夏期劇場 Commented Nov 11, 2011 at 19:28
  • It's a very old property, hailing from the Netscape days (hence the value often/always? being "Netscape"). I think some super old legacy code out there relies on it, so modern browsers tend to pretend to be Netscape to not break it. – Matt Greer Commented Nov 11, 2011 at 19:30
  • 2 navigator.userAgent and navigator.platform are more likely to be useful. But even still, it's better to do feature detection over browser detection. Sometimes you do have to drop down to browser detection, but it should be a last resort. – Matt Greer Commented Nov 11, 2011 at 19:37
 |  Show 2 more comments

2 Answers 2

Reset to default 10

Just found out IE11 preview has changed the value of navigator.appName:

before IE11, this value is:

"Microsoft Internet Explorer"

now with IE11 preview, this value has been changed to:

"Netscape"

not sure why MS did this, nor is this going to be permanent after the release of IE11

If you trust the user agent, you can use this web site: http://www.useragentstring.com/

It provides an API to analyse your current browser. It also has data on about every user agent you can imagine.

发布评论

评论列表(0)

  1. 暂无评论