Hacker News new | past | comments | ask | show | jobs | submit login

There should be better ways to identify the browser than the user agent. The user agent is a legacy artifact, have you seen how many "compatibility" parts are in there? Like why does the chrome user agent say "Mozilla" in iy?





Yes, but do you know any?

UA is the only thing I get in server logs to discover how much attention I should pay to support particular browsers.


User agent strings will be deprecated in favour of UA Client Hints, as mentioned in the proposal

https://wicg.github.io/ua-client-hints/


There's not really a good server side way to do it unfortunately. All the current alternatives to my knowledge require js.

It depends on your application but the only real alternative is to use a js analytics library to collect the statistics. The good news is that they're more accurate, can give you more information, and there's plenty of self hosted options like Matomo.

But it is yet another thing the client as to load, and adblockers will likely skew your metrics.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: