Browser Detection?

Forum to discuss the Web client version of Servoy.

Re: Browser Detection?

Postby Yeroc » Fri Sep 23, 2011 1:31 am

I was just looking for a way to do this recently and thought I'd post what I came up with in case this is useful for someone else. In my case, I just wanted to capture the browser information for logging purposes and add it as client info so that it shows up on the admin console as an extra bit of useful information:

Code: Select all
function onLoad(event)
  if (application.getApplicationType() == APPLICATION_TYPES.WEB_CLIENT)
    var useragent =;
    application.output("User Agent: " + useragent, LOGGINGLEVEL.INFO);

Posts: 109
Joined: Tue Aug 12, 2008 1:12 am
Location: Calgary, AB, Canada

Re: Browser Detection?

Postby antonio » Sat Jan 28, 2012 7:08 am

Awesome, great tip!
Anything else useful we can get from .getClientInfo() ?
Servoy Developer Version 5.2.16
Developer MAC OSX 10.8.4 Java version 1.6.0_51
Production Debian Linux Java version 1.6.0_29
Posts: 622
Joined: Sun Apr 02, 2006 2:14 am
Location: Australia

Re: Browser Detection?

Postby ROCLASI » Sat Jan 28, 2012 11:25 am

Hi Antonio,
antonio wrote:Anything else useful we can get from .getClientInfo() ?

See ... tInfo.html

Hope this helps.
Robert Ivens
ROCLASI Software Solutions / JBS Group, Partner
SAN Developer / Servoy Valued Professional / Servoy Certified Developer
Twitter: @roclasi / @servoyforge
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
Servoy Expert
Posts: 5293
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Browser Detection?

Postby bobcusick1332964082 » Thu Jun 27, 2013 3:16 pm

Cory (and Robert) - Seriously - THANK YOU! :lol:

This is JUST what I needed! Really helped out a lot!

Posts: 85
Joined: Wed Mar 28, 2012 9:48 pm


Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 1 guest