Quantcast
Channel: Detect 64-bit or 32-bit Windows from User Agent or Javascript? - Stack Overflow
Viewing all articles
Browse latest Browse all 13

Answer by GermanZ for Detect 64-bit or 32-bit Windows from User Agent or Javascript?

$
0
0

I used following code:

var is32BitBrowser = true;
if( window.navigator.cpuClass != null && window.navigator.cpuClass.toLowerCase() == "x64" )
   is32BitBrowser = false;
if( window.navigator.platform.toLowerCase() == "win64" )
   is32BitBrowser = false;

It worked everywhere expect Mac computers. And unfortunately seems that it's not possible to get that information via JavaScript :(. However one more trick could be done there. Because Adobe didn't support flash player on x64 browsers, you can just try to detect it. If detection is successful, than it is definitely 32 bit browser, if no, than it's 32 bit browser without flash plugin or it's 64 bit browser. Because penetration rate of Flash player is quite huge(see http://www.adobe.com/products/player_census/flashplayer/version_penetration.html), this should be good enough to at least detect x32 browser under Mac.


Viewing all articles
Browse latest Browse all 13

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>