Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Browser detection in a Eclipse RAP application

I was wondering if it is possible to detect the browser (especially IE) in a Eclipse RAP application. I'd like to inform the server about what browser the client is using, so that it can show adapted views.

Thanks in advance!

like image 690
nico.ruti Avatar asked May 18 '26 15:05

nico.ruti


1 Answers

Seems like I asked the question too early. The solution is:

    String answer = RWT.getRequest().getHeader("User-Agent");
    boolean forInternetExplorer = (answer != null && answer.indexOf("MSIE") != -1);
like image 116
nico.ruti Avatar answered May 20 '26 05:05

nico.ruti