| Author |
Getting browser type and version?
|
santhosh.R gowda
Ranch Hand
Joined: Apr 06, 2009
Posts: 296
|
|
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
|
Creativity is nothing but Breaking Rules
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
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.
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56151
|
|
|
Why do you need this information? If it's to conditionals JavaScript, there are better techniques than browser detection.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: Getting browser type and version?
|
|
|