Mobile devices/browser/version metrics and user-agents

Hello Club !

This is my first question so I hope I do it right :smiley:

We are trying to get information on devices, OS, versions used on our web applications.
Until now User-Agents were our go to solution, but recently we understood that it’s less and less easy to work with user-agents.

We need this information to make sure we are investing our testing effort on the more used device/browser/version combinations.

I was wondering what are you doing exactly to get your web app devices/broswers/versions metrics ?

Thanks all ! :smiley:

2 Likes

You might want to take a look at Client Hints, which web servers can request from user agents. There seems to be good support in modern browsers (except Firefox it seems) for this new/upcoming method of getting infos about the user agent. This also includes the relevant Sec-CH-UA* and related headers, which provide the browser, versions, platform etc. See:

And:

User agent returned values are an unquantified risk. If your app has a single sign-on or other integration, then it becomes important, so keen to know what the use case or actual risks you have found to be are.

Technically, you are doing nothing wrong. If a browser says it is the XYZ browser, that’s the browser you test, not the platform you should test. Unless your web based app interacts with the platform clipboard, filesystem, firewalls or other, you really want to ignore the platform. I know this sounds like god speaking, and I can hear the ringing of the lightening strike build-up, but that was the entire idea of browsers. I would be far more interested in metrics like canvas size, and orientation dark modes and performance as a tester. Things like does our page run well on a 4G connection is far more interesting to me than if Chrome is on a iPhone or a Samsung. Although there are some things to watch out for still, but display/canvas size is still your clue.