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
+12k Golang : Read XML elements data with xml.CharData example
+6.5k Golang : What fmt.Println() can do and println() cannot do
+19.6k Curl usage examples with Golang
+14.3k Chrome : ERR_INSECURE_RESPONSE and allow Chrome browser to load insecure content
+6.4k Golang : Command line ticker to show work in progress
+31.1k Golang : Regular Expression for alphanumeric and underscore
+10.1k CodeIgniter : How to check if a session exist in PHP?
+12k Golang : How to get a user home directory path?
+34k Golang : Validate IP address
+6.9k Golang : Multiplexer with net/http and map
+18.1k Golang : Delete item from slice based on index/key position
+7.8k Golang : Intercept and compare HTTP response code example