Javascript : Get operating system and browser information
Problem :
You need to find out your visitor's browser and os version. How to do that with Javascript or Jquery?
Solution :
The existing Javascript solution floating around forums can be easily spoofed and some have not been updated for years. To detect the visitors' browser accurately, please use WhichBrowser. It can detect mobile based browsers as well.
Follow the guidelines on how to install WhichBrowser at Github ( https://github.com/WhichBrowser/WhichBrowser#how-to-use-it )
and after installations... to detect the visitors' browser :
Browsers.browser
// Chrome 27
and to detect the visitors' OS version.
Browsers.os
// Mac OS X 10.8.4
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+12.9k Swift : Convert (cast) Int to String ?
+12.2k Golang : List running EC2 instances and descriptions
+9.3k Golang : How to get username from email address
+10.5k Android Studio : Simple input textbox and intercept key example
+11.9k Golang : Clean formatting/indenting or pretty print JSON result
+8.7k Golang : Get final balance from bit coin address example
+8.7k Golang : Heap sort example
+13.9k Golang : convert rune to unicode hexadecimal value and back to rune character
+18.4k Golang : Logging with logrus
+14.3k Golang : On enumeration
+8.4k Golang : How to check if input string is a word?
+13.8k Golang : convert(cast) string to float value