Why does navigator.appName return “Netscape” for Safari, Firefox and Chrome?
What do they have to do with the old browser Netscape? Could it be because of DOM0?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes and that’s for compatibility issues and not to be relied on.
MDN says: “This was originally part of DOM Level 0, but has been since included in the HTML5 spec.”
See Mozilla documentation here.
BTW; that’s why this cannot be used for browser detection. Browser detection is a BAD practice and you should always avoid it where possible. Do feature detection instead. But if anybody insists on this; they should use the
userAgentproperty instead.UPDATE 1: According to Compatibility Changes; IE11 now also returns
"Netscape"fornavigator.appNameproperty, to reflect the HTML5 standard and to match behavior of other browsers. Also see changes inuserAgentstring here… More on feature detection here…UPDATE 2: Microsoft Edge also returns
"Netscape"fornavigator.appName.