Web Design Forum: BROWSER DETECTION - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

BROWSER DETECTION Using JavaScript. Rate Topic: -----

#1 User is offline   MixCreations 

  • Dedicated Member
  • PipPip
  • Group: Members
  • Posts: 188
  • Joined: 14-July 09
  • Reputation: 1
  • Gender:Male
  • Location:North west england
  • Experience:Web Guru
  • Area of Expertise:Web Designer

Posted 05 March 2011 - 08:04 PM

Hi.I am just curious as to the fact that every browser i opened with the following code, Mozilla was the browser code name & user Agent:

<script type="text/javascript">

function yourBrowser() {
document.details.Name.value=navigator.appName;
document.details.Version.value=navigator.appVersion;
document.details.Code.value=navigator.appCodeName;
document.details.Agent.value=navigator.userAgent;
}
</script>

//Curious to understand, does mozilla make all the browsers or something, i thought they only owned Firefox and the old Netscape?

Thanks.

Ps: Browsers i used where: IE, FF, Google chrome and Safari.

This post has been edited by MixCreations: 05 March 2011 - 08:06 PM

0

#2 User is offline   AlecIsh 

  • Dedicated Member
  • Group: Platinum Membership
  • Posts: 220
  • Joined: 28-February 11
  • Reputation: 39
  • Gender:Male
  • Location:Accrington, Lancashire
  • Experience:Advanced
  • Area of Expertise:Coder

Posted 05 March 2011 - 09:56 PM

To test to see if your code is working, what do you get for "Let's see exactly what these properties reveal of the browser you're currently using:" here:
http://www.javascrip...navigator.shtml

I get:
appCodeName: Mozilla
appName: Netscape
appVersion: 5.0 (Windows; en-GB)
userAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 GTB7.1
platform: Win32

Which is correct, I am using FireFox (3.6)

Try that site again in your IE, FF, Google chrome and Safari :)

Would love to know if it comes back the same.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users