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
+9.1k Golang : How to get ECDSA curve and parameters data?
+25.2k Golang : Daemonizing a simple web server process example
+30.2k Get client IP Address in Go
+10.8k Golang : Create S3 bucket with official aws-sdk-go package
+6.7k Golang : Calculate BMI and risk category
+8.1k Useful methods to access blocked websites
+9k Golang : Write multiple lines or divide string into multiple lines
+5.2k Javascript : How to loop over and parse JSON data?
+13.1k Golang : Linear algebra and matrix calculation example
+19.9k Golang : Count number of digits from given integer value
+5.9k Golang : Convert Chinese UTF8 characters to Pin Yin