<% System.getProperty("os.name") %> can be used to identify the OS name running in the server machine. But how can i identify the OS information in the client machine using java in a web application?
A:
You can have some information in HTTP headers, such as User-Agent.
Maurice Perry
2009-08-14 05:37:04
User-Agent gives the OS name. But it does not give the specific name and version. For example, it will say 'Windows NT' even for Windows 2000 and Windows XP. But I want to identify the exact version.
Shwetha
2009-08-14 05:45:12
+3
A:
You can't. The browser doesn't send detailed OS information to web servers.
You can do some wild guess from the user-agent but that's not accurate at all.
ZZ Coder
2009-08-14 05:53:01
yes they do you can see stat in Google Analytics it show alot of data of client and only by javascript code so this can be done
Rahul Garg
2009-08-14 06:58:10
If you run software on client (including Javascript), it's a totally different issue. Some website can even fetch your computer serial number with ActiveX but I guess that's not the original question.
ZZ Coder
2009-08-14 07:10:31
A:
if you can use javascript you can simply find the navigator.appVersion and use it to determine the OS like if the appVersions is Windows 5.0, this means that the system is using Windows XP.
Saeros
2009-08-14 06:00:36
+2
A:
You'd have to use javascript or other client-side technology to find out. Then, send it back to the server throuht http.
Tom
2009-08-14 06:08:38