Forgive me if this is the wrong site to ask this question; some similar questions were closed on Web Applications Stack Exchange, so I asked this question here. If necessary, feel free to migrate this question.
Many current browsers identify themselves with user agent strings containing Mozilla/5.0 or Gecko (as in like Gecko), which only make sense for Firefox (and later versions of Netscape Navigator).
Why is this still being used? If, say, Chrome (the latest version as of this writing, on Windows 8.1 64-bit) identified itself as
Chrome/32.0.1700.107 (Windows NT 6.3; WOW64) AppleWebKit/537.36instead of
Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36would some websites not work correctly on it? Are there still web applications that rely on these substrings in the user agent string?
For reference, the user agent string for Firefox 27 on Windows 8.1 64-bit is:
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0 1 2 Answers
I still think there are some web applications that use it, but I do not think it is particularly many who use it for anything.
I ask maybe a little silly, but what do you need the information for?.
Okay, I found the answer at Stack Overflow: Why do Chrome and IE put “Mozilla 5.0” in the User-Agent they send to the server? (credit goes to joatis)
This is basically a historical vestige retained for compatibility with certain (very) old websites. It turns out that in the old days, some websites would refuse to serve certain types of content (such as inline frames) to browsers with user agent strings that did not contain substrings like "Mozilla", including Internet Explorer at the time. Microsoft worked around this issue by posing as Mozilla:
Mozilla/1.22 (compatible; MSIE 2.0; Windows 95)Everyone else ultimately followed suit, and the convention stuck. Even though it is considered bad practice today to serve different content based on the declared user agent string, some websites still rely on user agent sniffing to selectively serve content. (Heck, my personal website does a bit of UA sniffing to block known spambots!)