Firefox3.0.x奇怪的版本bug,版本判断意义重大

刚才用jQuery的$.browser检测浏览器版本的时候,发现我的Firefox返回了“1.9.0.3”,而使用JavaScript的原生API,用Navigator对象检测版本号也是这个数字。

可以看看我的截图:

显然这不是jQuery的问题。后来搜了一下,发现居然真是一个bug,而且也是今天刚刚提交(美国时间28日)的:

Bug description

Binary package hint: firefox-3.0

Entering about: in the location bar brigns up the about-screen.

It shows version 1.9.0.3 instead of 3.0.3, but still show correct application name (i.e. it shows "Firefox version 1.9.0.3").

It seems that is the version of xulrunner.

The User-Agent string shown below correctly identifies the build as Firefox/3.0.3.

Downloading the binary build from mozilla.com and running it (using the same profile/themes/add-ons/…) correctly shows 3.0.3 as the version number.

I know it’s a minor bug, but it ought to be fixed.

ProblemType: Bug
Architecture: i386
Date: Sun Sep 28 10:58:50 2008
DistroRelease: Ubuntu 8.04
NonfreeKernelModules: fglrx
Package: firefox-3.0 3.0.3 +build1+nobinonly- 0ubuntu0.8.04.1
PackageArchitecture: i386
ProcEnviron:
PATH=/usr/local/sbin:/usr/local/bin:/usr/ sbin:/usr/bin:/sbin:/bin:/usr /bin/X11:/usr/games
LANG=de_AT.UTF-8
SHELL=/bin/bash
SourcePackage: firefox-3.0
Uname: Linux 2.6.24-19-generic i686

顺便扫盲:版本判断是Web前端开发中非常重要的一个环节:这是因为“前端环境”由用户掌控,并不像“服务器端环境”那样便于“统一规划”、“统一开发”:我用Windows的服务器跑IIS,就可以一心一意地写.net;用Linux+Apache+PHP就可以一心一意地写PHP。因此,对前端各种服务的版本判断能为我们开发优雅的Web应用提供帮助。

目前,jQuery的浏览器版本判断和SWFObject对FlashPlayer的版本判断是我最欣赏的两种实现。

Advertisements

5 thoughts on “Firefox3.0.x奇怪的版本bug,版本判断意义重大

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s