How can the os of the client machine be detected?



How can the os of the client machine be detected?..

Answer / Salman

In JavaScript, you can't directly detect the OS of the client machine. However, you can make an educated guess based on user-agent strings sent by the browser. Use navigator.userAgent property to get the user agent string and then use regex or a library like useragentjs to parse the OS.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JavaScript Interview Questions

What is the use of 'bind' method in JavaScript?

1 Answers  


Can you assign a anonymous function to a variable?

1 Answers  


Please write the Code of simple javascript calculator withot eval() function

1 Answers  


What are the valid scopes of a variable in JavaScript?

1 Answers  


How is javascript different from java?

2 Answers  


How are DOM utilized in JavaScript?

1 Answers  


what is the purpose of using jsp?

1 Answers  


What are escape characters in javascript?

1 Answers  


Why javascript is fast?

1 Answers  


How to set a html document's background color?

1 Answers  


how to run the servlet in tomcat

1 Answers   DELL, TCS,


What is data types in javascript?

1 Answers  


Categories