Coding for Life
A 21-year Tech Enthusiast from Kolkata. MCA Postrgrad Student, Vellore Institute of Technology, Chennai, India. Opensource🤎
Markdown supported · ⌘↵ to post
The solution is attractive but not bulletproof. Changing the UserAgent in Safari is enough to trick the script into thinking I'm on Windows.
platform and vendor offer more details than just appVersion alone.
And checking appVersion to contain "Mac" doesn't identify iPhone, iPad, or other Apple devices because "Mac" is always included in the appVersion on every Apple product.


But it's a good start to improve upon :-)
YAKSH BARIYA
This does not work properly on Android devices. It showed me Linux instead of Android