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 : Extract XML attribute data with attr field tag example
+13.5k Golang : Gin framework accept query string by post request example
+14.9k Golang : Get timezone offset from date or timestamp
+77.6k Golang : How to return HTTP status code?
+36.2k Golang : Display float in 2 decimal points and rounding up or down
+15.1k Golang : invalid character ',' looking for beginning of value
+10.2k Golang : Create matrix with Gonum Matrix package example
+16.1k Golang :Trim white spaces from a string
+7.5k Golang : Test if an input is an Armstrong number example
+10.8k Golang : Calculate Relative Strength Index(RSI) example
+7.7k Golang : What fmt.Println() can do and println() cannot do
+4.8k Linux : How to set root password in Linux Mint