Get humanoid device / browser combination from user agent string?

On LinkedIn, you can view a list of sessions and record them from a distance.

In this list you can see what type of device / browser is used for this session for a person.

LinkedIn example

The current state of UserAgent strings is rather messy.

Question: Is there a reliable way (or library) to extract this information clean and reliable from the user agent string?

What am i trying to prevent

One big hairy ball of spaghetti with 30 if ( str.contains("yadadaya") under each other, which it should experience, and this is likely to break or become outdated very quickly.

Look for something in C # or JavaScript

+6
source share
1 answer

You probably want something like ua-parser-js or uap-csharp .

+3
source

All Articles