useragent-quickview is one of the best ways to detect a user agent string of any device and written in jQuery. It's compatible to view on mobile, iPad, desktop.
https://useragent-quickview.000webhostapp.com/
jQuery
© 2021 Suresh Pandiyan Code released under MIT License