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
+21.7k Golang : How to write CSV data to file
+22.5k Golang : Convert integer to binary, octal, hexadecimal and back to integer
+3.3k Golang : How to deal with configuration data?
+3.5k Golang : Fix opencv.LoadHaarClassifierCascade The node does not represent a user object error
+11.1k Golang : Get checkbox or extract multipart form data value example
+9.8k Golang : Save(pipe) HTTP response into a file
+8.2k Get form post value in Go
+15.7k Golang : Set, Get and List environment variables
+4.9k Golang : Process json data with Jason package
+9.8k Golang : Get timezone offset from date or timestamp
+7.1k Golang : Secure file deletion with wipe example
+6.7k Golang : Convert file content to Hex