为什么Internet Explorer(9)报告“Mozilla”在UserAgent中? [英] Why does Internet Explorer (9) report "Mozilla" in UserAgent?

查看:167
本文介绍了为什么Internet Explorer(9)报告“Mozilla”在UserAgent中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么Internet Explorer在UserAgent中包含 Mozilla



在Firefox中显示:



lockquote
Mozilla / 5.0(Windows NT 6.1; rv:7.0.1)Gecko / 20100101 Firefox / 7.0.1




在Interner Explorer中说明:
$ b


Mozilla / 5.0(compatible; MSIE 9.0; Windows NT 6.1; Trident / 5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0; .NET4.0E; .NET4.0C) / b>

在一些博客/论坛中提到,这是由于一些历史原因,但是原因是什么?



知道这一点会非常有帮助的。 / p>

http://en.wikipedia.org/ wiki / Mozilla


当用户访问一个网站(通过au ser代理(如Web浏览器)),通常会发送
文本字符串以标识Web
服务器的用户代理。它被称为用户代理字符串。 Netscape的web
浏览器将自己标识为Mozilla /,后面跟着一些关于它所运行的操作系统的
信息。



因为Netscape浏览器最初实现了许多功能,而不是
在其他浏览器可用,并迅速占主导地位的市场,
的网站设计工作,或完全工作,只有当他们检测到
适当在用户代理
字符串中的Mozilla版本。因此,竞争的浏览器开始模仿(斗篷或欺骗)
这个字符串,以便也与这些网站一起工作。最早的
例子是Internet Explorer使用用户代理字符串
开始Mozilla /(compatible; MSIE ...,以
的顺序接收用于Netscape的内容,其主要这个格式的用户代理字符串已经被其他用户代理复制了
,并且在Internet
资源管理器来统治浏览器市场之后仍然存在。
p>

wiki知道所有事情

https://superuser.com/questions/113020/why-does-internet-explorer-calls-itself-mozilla


Why does Internet Explorer has Mozilla in UserAgent?

In Firefox it's stating:

Mozilla/5.0 (Windows NT 6.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1

In Interner Explorer it's stating:

Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0; .NET4.0E; .NET4.0C)

In some blogs/forums it's mentioned, that it is due to some historical reasons, but what's the reason?

It would be very helpful to know about it.

解决方案

this should do it:

http://en.wikipedia.org/wiki/Mozilla

When users visit a website (via a user agent such as a web browser), a text string is generally sent to identify the user agent to the web server. It is known as the "user agent string". The Netscape web browser identified itself as "Mozilla/" followed by some information about the operating system it was running on.

Because the Netscape browser initially implemented many features not available in other browsers and quickly came to dominate the market, a number of web sites were designed to work, or work fully, only when they detected an appropriate version of Mozilla in the user agent string. Thus, competing browsers began to emulate ("cloak" or "spoof") this string in order to also work with those sites. The earliest example of this is Internet Explorer's use of a user agent string beginning "Mozilla/ (compatible; MSIE ...", in order to receive content intended for Netscape, its main rival at the time of its development. This format of user agent string has since been copied by other user agents, and persisted even after Internet Explorer came to dominate the browser market.

wiki knows everything

also https://superuser.com/questions/113020/why-does-internet-explorer-calls-itself-mozilla

这篇关于为什么Internet Explorer(9)报告“Mozilla”在UserAgent中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆