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
+15.1k Golang : package is not in GOROOT during compilation
+6.9k Golang : Normalize email to prevent multiple signups example
+10.6k RPM : error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
+11.7k Golang : How to detect a server/machine network interface capabilities?
+9.8k Golang : Format strings to SEO friendly URL example
+11.5k Golang : Generate DSA private, public key and PEM files example
+10.1k Golang : Test a slice of integers for odd and even numbers
+36.7k Golang : Display float in 2 decimal points and rounding up or down
+17.5k Golang : Find smallest number in array
+17.1k Golang : Covert map/slice/array to JSON or XML format
+13.9k Generate salted password with OpenSSL example
+11.8k Golang : convert(cast) float to string