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
+22.7k Golang : Strings to lowercase and uppercase example
+36.6k Golang : Save image to PNG, JPEG or GIF format.
+6.3k Apt-get to install and uninstall Golang
+7.5k Golang : Scanf function weird error in Windows
+14.2k Golang : Fix image: unknown format error
+6.3k Golang : Process non-XML/JSON formatted ASCII text file example
+13.3k CodeIgniter : "Fatal error: Cannot use object of type stdClass as array" message
+12.8k Android Studio : Highlight ImageButton when pressed on example
+17.1k Golang : Capture stdout of a child process and act according to the result
+12.3k Golang : Get month name from date example
+6.1k Golang : Debug with Godebug
+13.7k Golang : Get user input until a command or receive a word to stop