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
+6.8k Golang : Embedded or data bundling example
+11.9k How to tell if a binary(executable) file or web application is built with Golang?
+10.1k Golang : Read file and convert content to string
+7.7k Golang : How to stop user from directly running an executable file?
+5.5k Gogland : Datasource explorer
+16k Golang : Read a file line by line
+17k Golang : read gzipped http response
+6.5k Golang : How to search a list of records or data structures
+11.6k Golang : Change date format to yyyy-mm-dd
+12.5k Golang : How to display image file or expose CSS, JS files from localhost?
+7.1k Golang : How to solve "too many .rsrc sections" error?
+5.5k Golang : fmt.Println prints out empty data from struct