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
+11.4k Golang : Covert map/slice/array to JSON or XML format
+41.1k Golang : Get hardware information such as disk, memory and CPU usage
+13.2k Golang : How to determine if user agent is a mobile device example
+28k Golang : JQuery AJAX post data to server and send data back to client example
+18.4k Golang : Convert(cast) bytes.Buffer or bytes.NewBuffer type to io.Reader
+12.6k Golang : Check if an integer is negative or positive
+44.3k Golang : Read tab delimited file with encoding/csv package
+15.5k Golang : How to implement two-factor authentication?
+3.8k JavaScript : Rounding number to decimal formats to display currency
+8.7k Javascript : Read/parse JSON data from HTTP response
+16.3k Golang : Linked list example
+4.6k Golang : Stop goroutine without channel