Detect client browsertype and version by JAVA action?

0
Is it possible to detect the client browsertype and version and give the user a warning about using an old browser? I try to create a JAVA action but I can't get the 'return request.getheader("User-Agent");' to work. Is there an other way?
asked
2 answers
1

You don't need the request for this and the request isn't available in a regular Java action anyway. You can obtain the user agent from the ISession with the method getUserAgent, so you'd need to do something like:

getContext().getSession().getUserAgent();

You can also find this at https://apidocs.mendix.com/4/runtime/interfacecom11mendix11systemwideinterfaces11core11isession.html#a1ab2dd00b73e044747c429d5afe6b6a4

answered
0

Thanks, that works fine!

answered