mhugo Posted May 2, 2006 Share Posted May 2, 2006 Hi,Another question. Why do I get the appname "Netscape" instead of "Firefox" when running the following code with Firefox to get the browser information.Thank you very much.Regards,Mary<html><head> <title>Exercise 16.1</title></head> <body><script language="JavaScript"> var i document.writeln("The properties of the navigator objects: ") i = 0 for (i in navigator){ document.write("property: " + i + "<br />") document.write(" value: " + navigator+ "<br />") } </script></body></html> Link to comment Share on other sites More sharing options...
aspnetguy Posted May 2, 2006 Share Posted May 2, 2006 not sure why but if you look closer at the user agent property it clearly states it is FireFox Link to comment Share on other sites More sharing options...
raimo Posted May 2, 2006 Share Posted May 2, 2006 not sure why but if you look closer at the user agent property it clearly states it is FireFox<{POST_SNAPBACK}> If user agent is not changed to MSIE or "My Browser". You can change it whatever You want. :)With this extension it's easy to do: http://chrispederick.com/work/useragentswitcher/Anyway:if (navigator.userAgent.toLowerCase().indexOf('firefox') != -1) alert('Oh yes, FIREFOX!'); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now