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
+5.9k Golang : Gargish-English language translator
+12.4k Golang : Count number of runes in string
+12.4k Golang : Get user input until a command or receive a word to stop
+15.9k Golang : Capture stdout of a child process and act according to the result
+7.2k Findstr command the Grep equivalent for Windows
+39.6k Golang : How do I convert int to uint8?
+18.7k Golang : Convert(cast) bytes.Buffer or bytes.NewBuffer type to io.Reader
+21.1k Golang : Securing password with salt
+19.7k Golang : Convert date string to variants of time.Time type examples
+32.9k Golang : convert(cast) bytes to string
+11.6k Golang : "https://" not allowed in import path
+7.7k Android Studio : Import third-party library or package into Gradle Scripts