为什么所有浏览器的用户代理都以“Mozilla /”开头? [英] Why do all browsers' user agents start with "Mozilla/"?

查看:201
本文介绍了为什么所有浏览器的用户代理都以“Mozilla /”开头?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所有流行的浏览器的用户代理字符串,甚至是Internet Explorer,都以 Mozilla / 开头。为什么会出现这种情况?



总结:


  1. 使用User-Agent Mozilla / 1.0(Win3.1)发布Mozilla浏览器。它被公开重命名为Netscape,但在它的用户代理中它保留了原来的名字。

  2. Internet Explorer被释放。它使用 Mozilla / 启动它的User-Agent来欺骗Netscape,因为Web服务器通常是浏览器嗅探和服务页面的框架 - Netscape和IE支持的一个功能,浏览器的时代 - 只有Netscape。
  3. 随着时间的推移,Gecko,Konqueror,Opera,Safari和Chrome各自决定同样欺骗一些以前的浏览器的用户代理,以操纵浏览器浏览网页正确理解浏览器的功能。作为这种欺骗的一部分,所有浏览器都使用 Mozilla / 来启动它们的用户代理,就像之前的浏览器一样。还有很多其他的废话,比如现代的Chrome的用户代理同时声称是Mozilla,Chrome,Safari和像Gecko。


All popular browsers' user agent strings, even Internet Explorer's, start with Mozilla/. Why is this the case?

解决方案

It is a long and sad story.

In summary:

  1. Mozilla browser gets released, with User-Agent Mozilla/1.0 (Win3.1). It is publicly renamed to Netscape, but in its User-Agent it keeps its original name .
  2. Internet Explorer is released. It spoofs Netscape by starting its User-Agent with Mozilla/ because web servers were routinely browser sniffing and serving pages with frames - a feature supported by both Netscape and IE, but not other browsers of the era - to Netscape only.
  3. Over time, Gecko, Konqueror, Opera, Safari and Chrome each decide to similarly spoof the User-Agent of some previous browser in order to manipulate browser-sniffing web pages into correctly understanding their browser's features. As part of this spoofing, all the browsers start their User-Agents with Mozilla/, like the browsers before them had done. Plenty of other nonsense also results, like modern Chrome's User-Agent simultaneously claiming to be Mozilla, Chrome, Safari, and 'like Gecko'.

这篇关于为什么所有浏览器的用户代理都以“Mozilla /”开头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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