• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

request.getHeader("User-Agent")

 
Sean Casey
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was playing around with this, and noticed that in most cases it determines the browser type as well as the operating system it's running on. Is there a way we can determine dynamically the operating system of the user? I suppose I could turn it into a string and try to find certain substrings, but I was wondering if there was a method to determine the operating system. Thanks.
-Sean
 
Tony Alicea
Desperado
Sheriff
Posts: 3226
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I doubt that there's a servlet request method that returns the OS.
In JavaScript, however, there is a browser object
navigator.platform
that returns "Win32" in my case (WinNT4 SP6).
You can see what "User-Agent" your browser returns in my old page
http://www.geocities.com/~tony-alicea/detect.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic