The following JavaScript code returns \"Mozilla\" on all browsers. Why?
Short answer: Because people thought that user agent detection (instead of feature (AKA object) detection) was a good idea, so browser vendors started lying in order to compensate.
Long answer: History of the browser user-agent string
Many years ago, developers used browser detection to reject other browsers, usually favouring Netscape Navigator (precursor to Mozilla and Firefox, also codenamed Mozilla). They tested for the string 'Mozilla'
in the user agent. Internet Explorer got angsty and decided to imitate Netscape so they could join in on the fun.
That navigator.appCodeName based on useragent string and In IE's useragent string, there is Mozilla 4.0 or something, so thats why its display Mozilla
for both.
This property is kept only for compatibility purposes
.
Please refer this page:
https://developer.mozilla.org/en-US/docs/Web/API/NavigatorID/appCodeName http://www.w3schools.com/jsref/prop_nav_appcodename.asp
https://webmasters.stackexchange.com/questions/20709/can-anyone-tell-me-why-does-chrome-tell-it-is-mozilla-and-safari-also