The MDN documentation says that window.navigator.userAgent is deprecated and should not be used. If I want to collect the users browser and os data for analytics (not feature detection), what should I use instead?
The user agent string is becoming meaningless and extremely unreliable.
You should not use user agent string, rather you should use feature detection. If you need to use feature X, test to see if X is available.
But to also answer your question directly, there is no JS alternative.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments