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
+3.9k Javascript : How to get width and height of a div?
+4.1k Golang : micron to centimeter example
+15.9k Golang : Check if IP address is version 4 or 6
+11.3k Golang : Sort and reverse sort a slice of bytes
+10k Golang : Characters limiter example
+17k Golang : Find IP address from string
+6.2k Nginx : How to block user agent ?
+13.7k nginx: [emerg] unknown directive "ssl"
+7.4k Golang : Add text to image and get OpenCV's X, Y co-ordinates example
+14.2k Golang : Intercept Ctrl-C interrupt or kill signal and determine the signal type
+4.8k Javascript : How to replace HTML inside <div>?
+13.6k Golang : Missing Bazaar command