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
+4.9k CodeIgniter/PHP : Remove empty lines above RSS or ATOM xml tag
+7.9k Golang : io.Reader causing panic: runtime error: invalid memory address or nil pointer dereference
+11.9k Golang : Handle or parse date string with Z suffix(RFC3339) example
+21.4k Golang : Test file read write permission example
+8.5k Golang : Format strings to SEO friendly URL example
+6.6k Golang : Convert(cast) io.Reader type to string
+16.9k Golang : Get download file size
+12.6k Golang : Tutorial on loading GOB and PEM files
+4.5k Clean up Visual Studio For Mac installation failed disk full problem
+29.6k error: trying to remove "yum", which is protected
+6.3k Golang : Rot13 and Rot5 algorithms example
+28.8k Golang : Remove characters from string example