1

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 :)

asked Jul 5, 2011 at 8:03
7
  • tested with very simple code "alert($.browser.version);" Commented Jul 5, 2011 at 8:10
  • What do you get from this jsFiddle? Commented Jul 5, 2011 at 8:12
  • lonesomeday, jsFiddle alerts with "1.9.2.15" Commented 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.0 Commented Jul 5, 2011 at 8:15
  • 2
    you should do feature detection anyway :) Commented Jul 5, 2011 at 8:27

2 Answers 2

1

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.

answered Jul 5, 2011 at 8:18
Sign up to request clarification or add additional context in comments.

1 Comment

test case alerted 3.6.15 On link jquery.thewikies.com/browser - firefox browser 3x. gecko layout engine 1.9.2.15.
0

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.

answered Jul 5, 2011 at 8:31

1 Comment

I know this, but I was confused because at win7 today morning I saw 5.0 like it was said in wiki on Gecko page and forgot about this small part of code. But now I tested in WinXP and tried to find an answer. Thanks whatever! It is not big problem to code some more :)

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.