Not A Duplicate Of
How to detect Safari, Chrome, IE, Firefox and Opera browser?
The other questions does not address OS detection. And it is from 2012.
I have an app that supports iOS/Android/IE9+/Firefox/Safari/Chrome, but user needs to download different binaries depends on the browser/OS type.
So on the "download" page, I need to guide user to different download URLs depend on:
- Android(4.2+) any browser - download app from [google play store URL]
- iOS(7+) any browser - download app from [apple app store URL]
- IE9+/Firefox on Windows - download "plugin.exe"
- Safari on OSX - download "plugin.pkg"
- Chrome on Win/OSX - no need plugin download
All other browser/OS are not supported; need to notify user to either install Chrome(on Win/OSX) or use mobile app.
Question: How can I detect all these things in one web page?
Libraries I have found on Google, but not quite confident that they are the prefered way to do it.
https://github.com/bestiejs/platform.js
https://github.com/WhichBrowser/WhichBrowser
Please don't ask me to do feature detection, it is not about using an HTML5 feature.