JavaScript retrieves information icons of various browsers, and javascript retrieves icons
How to obtain browser Information
Window has a navigator object to let us know all the information about the browser. We can use a series of API functions to know the information about the browser.
The JavaScript code is as follows:
Copy codeThe Code is as follows: function message () {txt = "<p> browser code name:" + navigator. appCodeName + "</p>"; txt + = "<p> browser name:" + navigator. appName + "</p>"; txt + = "<p> browser platform and version:" + navigator. appVersion + "</p>"; txt + = "<p> whether to enable cookie:" + navigator. cookieEnabled + "</p>"; txt + = "<p> operating system platform:" + navigator. platform + "</p>"; txt + = "<p> User-agent header value:" + navigator. userAgent + "</p>"; document. getElementById ("example "). innerHTML = txt ; If (navigator. appName = "Netscape" | navigator. appName = "Microsoft Internet Explorer") & (parseFloat (navigator. appVersion)> = 4) {alert ("your browser is advanced! ");} Else {alert (" it's time to upgrade your browser! ");}}
We can use this function to notify the user browser whether to update the browser, and also to help the user know the browser information.
Basic information of various browsers
The author tested almost mainstream browsers. Of course, no matter how many browsers are Trident, Blink, Gecko, and Webkit browsers, there will not be too many differences in resolution. The relevant information is attached as follows:
This is an Edge
IE11, the landlord does not use IE6, but there should not be too many discrepancies
Safari, the main author is the Windows system Safari version is relatively low
Sogou browser, once the landlord is also infatuated with it for a while!
The QQ browser (version) is quite powerful. Now, in addition to the most popular Chrome browsers, dual-core Trident and Blink, the main website is very fast under the Chrome kernel.
360 security browser compatibility mode, using the Trident kernel of IE
Firefox, not much to mention. Netscape is a genuine version and a necessary browser for developers.
Chrome. Currently, Google is the most popular browser.
360 secure browser speed mode, Chrome kernel, fast
Code Result Analysis