1

There's a Java / JavaScript web app and I had to store in a database a few user agent properties for each login (successful authentication). Example properties are:

  • device is mobile or not
  • os,
  • browser

The purpose of the data is to create various statistics later. So it's not important to identify 100% of the user agents correctly. What is important:

  • identify ~99% of the cases correctly,
  • clearly identify the cases where we couldn't identify the properties (this is important, if the unidentifiable percentage grows above 1% then we should improve the identification),
  • use as little time and memory as possible,
  • identification can be on client side (javascript) or server side (java). I know that if we put it on the client side then it will depend on javascript, that's no problem.
  • be simple to implement :-)

I have never worked with user-agent strings before and now I a realized that user-agent string are quite complicated.

I found the browscap project and I found a java library on top of that: https://github.com/blueconic/browscap-java

This seems good, but I am worried about the complexity and sheer size of the CSV browscap-java is using: it's 200Mb.

So I'd like to ask if this (browscap-java on top browscap) is the sensible tool for it or not?

Are there any alternatives, recommendations?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.