Opera 10的Y2K错误:浏览器检测不正确

alt

Opera 10, the latest version of the world’s #5 browser (Google’s Chrome has overtaken it according to NetApplications), was released in beta earlier this month. One unintended consequence of being the first web browser to put out a double digit version numbered release? A lot of web sites have broken due to a bug with their browser detection code reminiscent of the “Y2K” bug.

Opera 10是世界排名第五的浏览器的最新版本(根据NetApplications,Google的Chrome已取代了它),已于本月初发布Beta版 。 成为第一个发布带有两位数版本编号发布的Web浏览器的意外结果吗? 许多网站由于浏览器检测代码的错误而损坏,使人联想到“ Y2K”错误。

According to Hallvord Steen, who works as a part-time Quality Assurance developer at Opera, a number of web sites have faulty browser detection schemes that assume a web browser’s version number will only have one digit. That causes a problem when detecting Opera 10, which of course clearly has more than one digit.

根据 Opera兼职质量保证开发人员的Hallvord Steen的说法 ,许多网站的浏览器检测方案都存在错误,这些方案假定网络浏览器的版本号只有一位。 这会在检测Opera 10时产生问题,当然显然有多个数字。

“If websites assume that version numbers always have a one-letter “major” part and look for a single digit, they are going to “detect” Opera 1!” writes Hallvord.

“如果网站假定版本号始终包含一个字母的“主要”部分并查找一个数字,则它们将“检测” Opera 1!” 哈沃德写道。

alt

So many web sites, including heavily trafficked sites like Microsoft’s Live Mail and Bank of America, are reading Opera 10 as Opera 1.0 and assuming that the browser isn’t supported. As a result, users of one of the most standards compliant and up-to-date browsers on the planet are instead greeted with messages urging them to upgrade to a better browser. Microsoft’s page, for example, suggests that users switch to Internet Explorer, Safari, or Firefox.

这么多的网站(包括Microsoft Live Mail和美国银行等流量大的网站)都将Opera 10读为Opera 1.0,并假定不支持该浏览器。 因此,使用这个星球上最符合标准和最新的浏览器之一的用户会收到消息,要求他们升级到更好的浏览器。 例如,Microsoft的页面建议用户切换到Internet Explorer,Safari或Firefox。

This is something that web developer Andrew Gregory predicted would happen in a blog post back in May.

网络开发人员安德鲁·格雷戈里(Andrew Gregory)预测,这将在5月的一篇博客文章中发生。

Unfortunately, this reflects poorly on Opera, even though it is the fault of shoddy programming on the part of some web developers. Many users will undoubtedly blame the problem on Opera when the same sites works perfectly in other browsers. In reality, though, this isn’t Opera’s fault. Does your site’s browser detection work with Opera 10?

不幸的是,这在Opera上反映不佳,尽管这是某些Web开发人员的劣质程序设计的错误。 当相同的站点在其他浏览器中完美运行时,许多用户无疑会将问题归咎于Opera。 但实际上,这并不是Opera的错。 您的站点的浏览器检测是否可与Opera 10一起使用?

翻译自: https://www.sitepoint.com/opera-10s-y2k-bug-browser-detection-goes-bad/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值