Using JavaScript is there a way to determine what browser type the user is using?
I need to compile some data and would like to collect this in a file.
Browser Type
Started by Chan, May 22 2007 10:26 AM
3 replies to this topic
#1
Posted 22 May 2007 - 10:26 AM
|
|
|
#2
Posted 23 May 2007 - 03:33 AM
Here try using this code:
But, I don't know why, it detect my Firefox as Netscape 5 :S perhaps because I had Netscape installed? I don't know! Anyways, If you want something more powerful and perhaps more accurate try using PHP...
<html>
<body>
<script type="text/javascript">
var browser=navigator.appName
var b_version=navigator.appVersion
var version=parseFloat(b_version)
document.write("Browser name: "+ browser)
document.write("<br />")
document.write("Browser version: "+ version)
</script>
</body>
</html>
But, I don't know why, it detect my Firefox as Netscape 5 :S perhaps because I had Netscape installed? I don't know! Anyways, If you want something more powerful and perhaps more accurate try using PHP...
#3
Posted 23 May 2007 - 04:00 AM
TheComputerMaster said:
But, I don't know why, it detect my Firefox as Netscape 5 :S perhaps because I had Netscape installed? I don't know!
I made a little test using your code:
"Real" name: "False" name: "Real" version: "False" version: ---------------------------------------------------------------------------------------- FireFox Netscape 2.0.0.3 5 Internet Explorer Internet Explorer 7.0.5730.11 4 Netscape browser Netscape 8.1.2 5 Opera Opera 9.02 9.02
#4
Posted 23 May 2007 - 09:28 AM
Yes I agree with Firefox and Internet Explorer ones, I didn't Try it on Netscape, coz I just used that for a few days, I didn't like it and as far as I know and tested it, Opera is alright :)


Sign In
Create Account


Back to top









