Why do Chrome and IE put “Mozilla 5.0” in the User-Agent they send to the server? [duplicate]

匿名 (未验证) 提交于 2019-12-03 01:58:03

问题:

This question already has an answer here:

When i myself send many request to the server and found a little thing 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 other browser in internet explorer that he put 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 organization no matter for Google and Microsoft. prehaps he was competitor for both. Why MSFT and google both put mozilla in their user agent. any reason for putting mozilla in connection string.

Why chrome and IE both put mozilla in userstirng when they send the request. i am not know why but any specific reason for that.

回答1:

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.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!