Is there a way to determine the operating system of the user browsing and also whether it is 64 bit or a 32 bit
Asked
Active
Viewed 192 times
8
-
2Which "user's" operating system? If it means "web[browser] user" then NodeJS is irrelevant to answering the question; as only data from the browser can be used (such as the easily lied about User Agent header). And if it's not for a "web[browser] user", then the [web] tag is irrelevant. – user2864740 Jul 13 '16 at 04:11
-
use `os.arch()` may be it will give you the system info – uzaif Jul 13 '16 at 04:11
-
Related: http://stackoverflow.com/questions/6551006/get-my-os-from-the-node-js-shell – mwilson Jul 13 '16 at 04:11
1 Answers
3
Use nodejs built in module os
for getting architecture information
var os = require("os");
console.log(os.arch()); //ia32
you can use process object
porcess.arch //'ia32'

uzaif
- 3,511
- 2
- 21
- 33