Browser Version Number Reporting

March 31 2009, 5:08am

I've recently needed to do some browser detection in JS using jQuery and it took me a long time to compile the information I needed. Here's a short compilation of it.

Please note this is specific to jQuery ONLY. Although I would suggest doing the same kind of detection as it will capture the most browsers since it will match Mozilla based browsers and Webkit based browsers, not just Firefox and Safari. See:

Firefox:

  • Gecko Version: Firefox and other Mozilla based browsers will report the Gecko rendering engine version number, not the browser version number.
  • In the browser 'About' section and navigator.appVersion its reported as 'rv' number.
  • The rv number is consistent across operating systems
  • Simple Translation:
    • Firefox 1.x == rv 1.7
    • Firefox 2.x == rv 1.8
    • Firefox 3.x == rv 1.9
  • Full table of release numbers: http://en.wikipedia.org/wiki/Firefox#Release_history

Safari

  • Webkit Version: Safari will report the Webkit rendering version, not the browser version number.
  • The Webkit version number is NOT consistent across operating systems :(
    • Ever so slight variations, noted in Wikipedia linked below.
  • Simple Translation:
    • Safari 1.x == 85+
    • Safari 2.x == 412+
    • Safari 3.0 == 522.11+
    • Safari 3.1 == 525.13+
    • Safari 3.2 == 525.26+
  • Full table of release numbers: http://en.wikipedia.org/wiki/Safari_(web_browser)#Version_history

    Opera

  • There is no version translation, so Opera 9.20 is reported as 9.20, etc.

Internet Explorer

  • There is no version translation, so IE6.0 is reported as 6.0, etc.