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
+28.9k Golang : Saving(serializing) and reading file with GOB
+4.8k Linux : How to set root password in Linux Mint
+5.2k Golang : Intercept, inject and replay HTTP traffics from web server
+6.4k Golang : Check if password length meet the requirement
+13.2k Golang : Read XML elements data with xml.CharData example
+5.7k Golang : Generate multiplication table from an integer example
+4.8k Swift : Convert (cast) Float to Int or Int32 value
+12.4k Swift : Convert (cast) Int or int32 value to CGFloat
+18.8k Golang : Populate dropdown with html/template example
+9.8k Golang : Read file and convert content to string
+11.3k Golang : Display a text file line by line with line number example
+11.7k Golang : How to parse plain email text and process email header?