Name

Function getGeckoRv() — Returns Gecko rv: value as a floating point number

Synopsis


Number getGeckoRv();

if (navigator.appName == 'Netscape')
{
  var rv = getGeckoRv();
  if (rv < 1.0)
  {
    alert('You should upgrade to Gecko 1.0.1 or higher');
  }
}

    

Source

geckoGetRv.js

Uses:  nothing

See Also

Description

geckoGetRv() is a standalone function which will return the rv value from a Gecko based user agent in the form of a floating point number. Note that versions of Mozilla before rv: 0.9.1, including Netscape 6.0, did not use rv: values and will return 0. Non-Gecko browsers will return -1.

Logic.  rv: x.y.z is converted into a numeric value equivalent to parseInt(x) + parseInt(y)/100 + parseInt(z)/(100*100). Thus is the rv value is 1.23.32 it will be converted to 1.2332.

Example

Example 1. Basic Example