why Does “navigator.userAgent” in javaScript returns the String “Mozilla” when tried in a google chrome borwser?

前端 未结 2 1229
死守一世寂寞
死守一世寂寞 2021-02-05 19:38

Im developing a javaScript code and I want to determine the version and brand of the client\'s browser, here\'s the piece of code I\'m using to do so :

var bro         


        
2条回答
  •  一整个雨季
    2021-02-05 20:29

    That is the user agent string for Chrome. It has Mozilla in the name for historical reasons. Even funnier is when you see Mozilla in the user agent string for Internet Explorer :)

    This link has UA strings for Chrome, you might find it useful: http://www.useragentstring.com/pages/Chrome/.

提交回复
热议问题