Andrew Poulos said the following on 10/30/2006 7:01 PM:
> Is there a way to test whether the browser is Firefox version less than
> 2.0 or 2.0+?
You feature detect and it doesn't matter. Same as with IE/Firefox/Opera.

Signature
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Andrew Poulos a écrit :
> Is there a way to test whether the browser is Firefox version less than
> 2.0 or 2.0+?
The right question is : what do you need (in FF 2) ?
> Is there a way to test whether the browser is Firefox version less than
> 2.0 or 2.0+?
I take a positive view that that you are using this for your own
interest and not for inferring feature support based on browser
sniffing:
alert( navigator.userAgent );
My Firefox 2 looks like:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1)
Gecko/20061010 Firefox/2.0
*It is unreliable*. However, since few sites use sniffing any more
(though unfortunately some major sites still do) there is less
incentive to fake the UA string.

Signature
Rob
Andrew Poulos - 31 Oct 2006 03:30 GMT
>> Is there a way to test whether the browser is Firefox version less than
>> 2.0 or 2.0+?
>
> I take a positive view that that you are using this for your own
> interest and not for inferring feature support based on browser
> sniffing:
Thanks
> alert( navigator.userAgent );
>
[quoted text clipped - 6 lines]
> (though unfortunately some major sites still do) there is less
> incentive to fake the UA string.
I agree with you that using navigator.userAgent is unreliable (I haven't
actually tested the reliability, it just looks suspect).
Andrew Poulos