2 ms·
User-agent, in my experience, is mostly misused as an attempt for compatibility, but it really shouldn't be used that way. The proper way to do cross-browser co
by roblabla 6y ago
User-agent, in my experience, is mostly misused as an attempt for compatibility, but it really shouldn't be used that way. The proper way to do cross-browser compat is feature testing, as browsers keep adding more features. Google until recently was distributing a different, inferior (at least IMO) version of Google Search to Android Firefox users, based on user-agent.
To detect the OS for download, either JS will have to be used, or the new granular Client Hints[0], specifically User-Agent Client Hints[1]. You can use Sec-CH-UA-Platform and Sec-CH-UA-Arch to figure out the OS and CPU Architecture of the client. However, browsers may refuse to honor this, depending on the privacy budget.
Seeing User-Agent go away will be a net positive for web compatibility. That it also improves privacy is just a nice-to-have.
[0]: https://developer.mozilla.org/en-US/docs/Glossary/Client_hints https://developer.mozilla.org/en-US/docs/Glossary/Client_hin...
[1]: https://wicg.github.io/ua-client-hints/ https://wicg.github.io/ua-client-hints/