1

I need to be able to determine which version of Windows (32-bit or 64-bit) a user is running. My computer is very definitely 64-bit:

enter image description here

But when I try using window.navigator.platform in the console in either Firefox, Chrome, or IE11, it returns WIN32.

Can anyone give me an idea of why this is happening? If this isn't an accurate way of determining OS platform, what is? (This has to be done client-side.)

EmmyS
  • 11,892
  • 48
  • 101
  • 156
  • Are these 32 or 64 bit browsers ? Having a 64 bit OS does not necessarily mean you have an identical browser. The Useragent should convey information about the operating system – Marged Sep 09 '15 at 20:13
  • 1
    Is it detecting your OS bit-ness or just the Browser bit-ness? Is it possible the Browser itself is 32-bit running on a 64-bit OS? Have you searched? http://stackoverflow.com/questions/1741933/detect-64-bit-or-32-bit-windows-from-user-agent-or-javascript – Matt Runion Sep 09 '15 at 20:13
  • @mrunion - yes, I've searched. That's the post I got the `window.navigator.platform` from. I've also tried the `cpuClass` property, but it returns "undefined" in every browser. – EmmyS Sep 09 '15 at 20:35
  • cpuClass only works on IE (http://help.dottoro.com/ljcsokrr.php). – Matt Runion Sep 09 '15 at 20:39
  • @mrunion - thanks. I wasn't able to quickly find any documentation on that one. – EmmyS Sep 09 '15 at 20:44

1 Answers1

1

maybe this solution can help link to mdn