0

I have a web product (Java) that is developed by another team. In the produce I use the below Javascript for checking the browser is 64 or 32 bit.

if (navigator.userAgent.indexOf("WOW64") != -1)
{
    alert("This is a 32 bit browser");
}
else if (navigator.userAgent.indexOf("Win64") != -1)
{
    alert("This is a 64 bit browser");
}
else
{
    alert("This is a 32 bit OS");
}

Whenever I access that product using a 64-bit browser, it says that this browser is a 32-bit one. How can I fix this?

Jesper
  • 202,709
  • 46
  • 318
  • 350
jtk
  • 11
  • 3
  • [duplicate](http://stackoverflow.com/questions/1741933/detect-64-bit-or-32-bit-windows-from-user-agent-or-javascript) – Kirill Pisarev Feb 03 '15 at 12:16
  • I'm not so sure that is an exact duplicate - that one is governing windows - this one is finding out whether IE itself is running in 32bit mode on 64bit windows, which is certainly possible to do, and is needed in some situations (hosting certain COM objects etc). – James Thorpe Feb 03 '15 at 13:00

0 Answers0