my dog learned polymorphism*
The moose likes HTML, CSS and JavaScript and the fly likes Problem to determine NetScape browser version Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Problem to determine NetScape browser version" Watch "Problem to determine NetScape browser version" New topic
Author

Problem to determine NetScape browser version

arnold yan
Ranch Hand

Joined: May 31, 2002
Posts: 40
Hi, I'm trying to determins users' NetScape browser version and based on that, I need to display different messages. Is it possible for me to tell if a user has NetScape 7.0 or 7.1? I tested with following javascript,
alert("broweserversion: " + navigator.appVersion);
On both 7.0 and 7.1, I got the same alert message like, "browserversion: 5.0 (Windows, en-US)". So I can not tell the difference. And it is not even showing me the correct version.
Is there another way I can accomplish this?
Thanks.
Arnold
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
If you want to do browser sniffing then here is the site for you to look at...
http://webreference.com/tools/browser/javascript.html
There are tons of links for you to look at here that show you how to detect the difference between mjor and minor versions.
Eric
arnold yan
Ranch Hand

Joined: May 31, 2002
Posts: 40
Cool! I found what I need from that site. Many thanks!
Arnold
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I had to use that site to get Opera versions correctly since it can hide under other browsers.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem to determine NetScape browser version