Forum Moderators: open

Message Too Old, No Replies

Detect Netscape 6.0 vs 6.1 vs 6.2

How can I tell which of these browsers is being used?

         

Purple Martin

5:17 am on Jan 21, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm getting different layout results in Netscape 6.0, 6.1, and 6.2. It'd be OK if I could sniff for the three different browsers and code accordingly, but unfortunately navigator.appVersion returns the same for all three. How can I tell which version of N6 is being used? Client-side detection would be best, but server-side (jsp) is also a possibility.

joshie76

8:58 am on Jan 21, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You should be able to pull these values out using the navigator.userAgent property in client JavaScript.

You'll see at the end of the userAgent string that it ends Netscape6/6.x where the x is the point version you are after. You'll be able to use the same detection on the server using the user agent - in ASP it would be Request.ServerVariables("HTTP_USER_AGENT").

Purple Martin

10:28 pm on Jan 21, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks Joshie! That worked great :)