Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / JavaScript / October 2006



Tip: Looking for answers? Try searching our database.

test for FF 1.xx and FF 2.xx

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andrew Poulos - 31 Oct 2006 01:01 GMT
Is there a way to test whether the browser is Firefox version less than
2.0 or 2.0+?

Andrew Poulos
Randy Webb - 31 Oct 2006 01:19 GMT
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/

ASM - 31 Oct 2006 01:29 GMT
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) ?
RobG - 31 Oct 2006 01:36 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:

 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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.