• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting browser type and version?

 
santhosh.R gowda
Ranch Hand
Posts: 296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to get browser type and version from the request and i had used request .getHeader("User_Agent") but im getting
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) .but im using MSIE.. and even tried not installing the mozilla also but im getting the same value....please conclude me how to get the type and version of browser
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All the user_agent header does is reports what the browser tells it. IE tells you just what you are seeing. See this for more about IE user agent strings.

NB: you need to be aware there are browsers that will spoof this to avoid browser compatability restrictions. For example you can get Opera to report itself as IE.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64721
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you need this information? If it's to conditionals JavaScript, there are better techniques than browser detection.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic