473,320 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

test for FF 1.xx and FF 2.xx

Is there a way to test whether the browser is Firefox version less than
2.0 or 2.0+?

Andrew Poulos
Oct 30 '06 #1
4 1100
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.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Oct 31 '06 #2
ASM
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) ?

Oct 31 '06 #3

Andrew Poulos wrote:
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.

--
Rob

Oct 31 '06 #4
RobG wrote:
Andrew Poulos wrote:
>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 );

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.
I agree with you that using navigator.userAgent is unreliable (I haven't
actually tested the reliability, it just looks suspect).

Andrew Poulos
Oct 31 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Berthold Hoellmann | last post by:
Hello, When I use ./configure --with-thread --with-fpectl --with-signal-module \ --with-pymalloc --enable-shared --with-cxx=g++ make test on 2.3.3 I get
0
by: Remy Blank | last post by:
Ok, here we go. I added the possibility for tests using the unittest.py framework to be skipped. Basically, I added two methods to TestCase: TestCase.skip(msg): skips unconditionally...
4
by: Edvard Majakari | last post by:
Hi, I just found py.test and converted a large unit test module to py.test format (which is actually almost-no-format-at-all, but I won't get there now). Having 348 test cases in the module and...
0
by: Andrea M. Segovia | last post by:
I just compiled (but did not install) perl 5.8.0 on an SGI Origin 300 server (IP35) running IRIX 6.5.20m. Make test reported one test error, which I narrowed down to .../lib/ExUtils/t/Constant.t...
0
by: Jussi Mononen | last post by:
Hi, I'm having problems to successfully execute the test scripts on a Compaq host ( OSF1 tr51bdev V5.1 2650 alpha ). Almost all tests end up with the following error message "PARI: *** ...
4
by: arotem | last post by:
Hi, I am trying to call an unbound method (PrintInput) with the object instance as the first argument but getting the following error: "TypeError: unbound method PrintInput() must be called with...
0
by: Tim Haughton | last post by:
I've just released an article on using Test Driven Development with C# and Windows Forms. GUI's are often difficult to test, so I thought it might be of interest. The article along with the...
6
by: Ben Finney | last post by:
Howdy all, Summary: I'm looking for idioms in unit tests for factoring out repetitive iteration over test data. I explain my current practice, and why it's unsatisfactory. When following...
27
by: Josh | last post by:
We have a program written in VB6 (over 100,000 lines of code and 230 UI screens) that we want to get out of VB and into a better language. The program is over 10 years old and has already been...
6
by: ypjofficial | last post by:
HI, I have following terrific confusion. class test { public: int i; int * j; int **k;
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.