Mozilla 1.6b < Mozilla 1.0.1?

Warning, you are using Mozilla Version 1.6b.  The recommended browsers to view this page are Internet Explorer 4.0 or better, Netscape 4.0 or better, Mozilla 1.0.1 or better, or Opera 5.0 or better.

This USPS page uses the expression (browserName == "Mozilla" && browserVersion >= 1.0) to recognize acceptable versions of Mozilla. The string "1.6b" becomes NaN when coerced to a number, so the expression is false if you're using Mozilla 1.6b. If you're using Mozilla 1.5 instead of 1.6b, you won't see the warning. Ironically, "1.0.1", the minimum version they claim to support, coerces to NaN.

If the site had used parseFloat instead of implicit coercion, it wouldn't have hit this problem. parseFloat("1.6b") returns the number 1.6.

3 Responses to “Mozilla 1.6b < Mozilla 1.0.1?”

  1. Dennis Pallett Says:

    I got the same message, except for Mozilla 1.5a instead of 1.6b. Funny thing is though, I’m not even using Mozilla 1.5a. I’m using Firebird 0.6.1

  2. alanjstr Says:

    I love it when they tell me to upgrade. It makes me want to smack them around.

    Hmmm. You might want to turn the Topics sidebar into a dropdown.

  3. Jackrabbit Slim's Says:

    This site is best viewed with whatever you like.

    Rant of the day: Today I got reminded of one of the most annoying things I have ever found on the web: Websites who question my choice in web browsers. The familiar “You need at least such and such version to be able to see this site” message. If at le…