OS: Windows XP
Browser: Firefox 5.0 (use it and update it from 3.5)
Jquery: 1.6.2(from cdn http://code.jquery.com/jquery.min.js)
In my jquery script I use browser detection feature and it returns me 1.9.2.15 version, but here : http://en.wikipedia.org/wiki/Mozilla_Firefox_5#Version_5.0 there is no such version! Also I have problem because my script thinks that it work with Firefox 3.6 instead of 5.0.
Is this firefox's user agent bug or jquery?
Thanks.
UPD: it seems this is firefox bug, checked with http://developer.yahoo.com/yui/examples/yahoo/yahoo_ua_detection_clean.html and it created object YAHOO.env.ua with value gecko :1.92 !!!
UPD2: Checked my browser with http://davecardwell.co.uk/javascript/jquery/plugins/jquery-browserdetect/ it detected You are using version: 3.6.15 (3.6)
UPD3: Tested on Windows 7 with clean firefox - UA version = 5.0
UPD4: Posted to bugzilla https://bugzilla.mozilla.org/show_bug.cgi?id=669267
UPD5: Sorry everyone, found in "about:config" string replacement. It was old plugin bug.Thank to firefox developers for answer. Question closed. I will not remove this question so everyone will know to check "about:config" before panic :)
-
tested with very simple code "alert($.browser.version);"Dmytro– Dmytro2011年07月05日 08:10:28 +00:00Commented Jul 5, 2011 at 8:10
-
What do you get from this jsFiddle?lonesomeday– lonesomeday2011年07月05日 08:12:49 +00:00Commented Jul 5, 2011 at 8:12
-
lonesomeday, jsFiddle alerts with "1.9.2.15"Dmytro– Dmytro2011年07月05日 08:14:57 +00:00Commented Jul 5, 2011 at 8:14
-
Álvaro G. Vicario, there is en.wikipedia.org/wiki/Gecko_(layout_engine) and there is no 1.9.2.15, and for firefox 5.0 should be 5.0Dmytro– Dmytro2011年07月05日 08:15:33 +00:00Commented Jul 5, 2011 at 8:15
-
2you should do feature detection anyway :)meo– meo2011年07月05日 08:27:17 +00:00Commented Jul 5, 2011 at 8:27
2 Answers 2
You will have to use jQuery plugin to see the "real" browser version:
http://jquery.thewikies.com/browser/
Live test case: http://jsfiddle.net/Zf3NW/1/
(Note it's included there under Manage Resources)
Tested under Chrome and Firefox and returned the true versions.
1 Comment
The version you're getting -- 1.9.2.15 -- is the version of the Gekko rendering engine, not of Firefox itself.
Each version of Firefox is shipped with a specific version of Gekko, so you can work out the Firefox version from this, provided you know that the user is running Firefox.
The thing is, though, that many of the smaller browsers on the market (eg Camino, Flock, IceWeasel, etc) borrow their rendering engines from the big name browsers. as is also used by other browsers, including Gekko, so a given version of Gekko could be running in Firefox, but it could also be running in another browser.
JQuery can't tell that, but it also doesn't really care -- as long as it knows which rendering engine it it, and what version, that deals with everything that JQuery needs to worry about, because browsers using the same rendering engine will generally render pages pretty much the same.
Hope that explains it a bit for you.