Solved

IE 11 : How do we Get the Browser Version I.E 11 Using Java ?

Posted on 2013-12-14
3
1,831 Views
Last Modified: 2013-12-29
Hello All,

I'm using I.E - version 11 Browser. In My application it has some issue. so that i want to detect the browser version using java.

Before I.E 11 , we using "getHttpServletRequest().getHeader("User-Agent")".

It gives the the Browser name and Version. But After Introducing I.E 11 User Agent MSIE was removed..

So that how can we get the version for I.E in JAVA.

If any help it would help me a lot...

Thank You...
0
Comment
Question by:ZoniacUser
3 Comments
 
LVL 50

Expert Comment

by:jcimarron
ID: 39718901
ZoniacUser--
I may not understand the situation, but does this reference help
https://java.com/en/download/help/ie_tips.xml 
Java is up to version 7 Update 45 now, but the instructions are still valid.

Or perhaps this reference
https://java.com/en/download/help/enable_browser.xml

Or use this
Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko

Taken from
http://msdn.microsoft.com/en-us/library/ie/bg182625(v=vs.85).aspx
0
 
LVL 27

Accepted Solution

by:
dpearson earned 500 total points
ID: 39719567
Prior to IE11 the user agent string would be:
Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)

So you could test for "MSIE".

For IE11 it is now:
  Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko

So you should include  a test instead for the string "Trident" - and if you wish you can check the version in there too (Trident/7.0 for IE11).

Doug
0
 

Author Closing Comment

by:ZoniacUser
ID: 39745555
Thank you for your valuable Comments ! It Works.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Maven Project: Hibernate Dependencies Conflict 10 40
iterator/ListIterator approach 17 39
How  can  i  resolve  HTTP Status 404 -? 8 46
Java: The Public Class Main 4 32
#Citrix #Internet Explorer #Enterprise Mode #IE 11 #IE 8
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question