Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

http://www.w3schools.com/js/tryit.asp?filename=try_nav_all

I get

Browser CodeName: Mozilla

Browser Name: Netscape

Browser Version: 5.0 (Windows NT 5.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1

Cookies Enabled: true

Platform: Win32

User-agent header: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1

share|improve this question
    
Are you trying to do something with this information, or just asking out of curiosity? The very short version is that useragent information like this is a giant mess of lies to get around bad browser sniffing, indicate compatibility/similarity, etc. But if you're actually trying do something, there's probably a better way to test for browsers. It's pretty unusual now and even discouraged to do actual browser sniffing like this, in part because of the problem you're seeing. –  Su' Oct 7 '11 at 18:45
    
I'm asking for curiosity –  Dan Oct 7 '11 at 19:49
add comment

2 Answers 2

up vote 8 down vote accepted

Basically it started because some websites used to sniff the user-agent to tell what browser someone was using so they could block browsers that they thought wouldn't work with their websites. Specifically, websites were blocking Internet Explorer because it didn't offer as many features as Netscape Navigator. Instead of simply building a website that works across browsers, webmasters chose to just block IE completely. To get around that, Internet Explorer started to put Mozilla in their user-agent (with "compatible" in parenthesis).

Another reason is some browsers share the same rendering engine. For example, both Safari and Chrome use the webkit rendering engine. Firefox and SeaMonkey both use gecko. As a result they will both have pieces of their user-agent which will match and/or mention the other browser.

This article has a good summary of user-agent history in much more detail.

share|improve this answer
add comment

Almost every browser says it's Mozilla, meaning it is (more or less) compatible with Mozilla rendering engine.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.