Why do Chrome and IE put "Mozilla 5.0" in the User-Agent they send to the server? [duplicate]
Asked Answered
F

1

169

When I myself send many requests to the server I found it amazing that in IE if I choose opera user string that the value of user string was

User-Agent  Opera/9.80 (Windows NT 6.1; U; en) Presto/2.2.15 Version/10.00

But if I choose another browser in Internet Explorer that it puts Mozilla 5.0 in the user string first.

When I send the ajax request from Chrome that I found same thing that they put user string

Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.20 (KHTML, like Gecko) Chrome/11.0.672.2 Safari/534.20

I found that Mozilla is an organization that doesn't have anything to do with Google and Microsoft. Perhaps it was a competitor for both. Why do MSFT and Google both put Mozilla in their user agent? Is there any reason for putting Mozilla in connection string?

Why do chrome and IE both put Mozilla in the userstring when they send the request? I do not know why but is there any specific reason for that?

Fabrianna answered 26/2, 2011 at 6:21 Comment(2)
Mozilla/5.0 is the general token that says the browser is Mozilla compatible, and is common to almost every browser today.Congou
@GeorgeStocker I think this would be a better duplicate.Butterfly
S
264

See: user-agent-string-history

It all goes back to browser sniffing and making sure that the browsers are not blocked from getting content they can support. From the above article:

And Internet Explorer supported frames, and yet was not Mozilla, and so was not given frames. And Microsoft grew impatient, and did not wish to wait for webmasters to learn of IE and begin to send it frames, and so Internet Explorer declared that it was “Mozilla compatible” and began to impersonate Netscape, and called itself Mozilla/1.22 (compatible; MSIE 2.0; Windows 95), and Internet Explorer received frames, and all of Microsoft was happy, but webmasters were confused.

Sextain answered 26/2, 2011 at 6:30 Comment(4)
That's pretty hilarious but nice to know! :DSen
User agent string for Microsoft Edge: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0 :)Stander
@IgorJerosimić Nailed it.Hie
Mozilla/5.0 is the general token that says the browser is Mozilla compatible, and is common to almost every browser today.Congou

© 2022 - 2024 — McMap. All rights reserved.