This article describes the method of JS to determine whether the 360 secure browser is a fast kernel. Share it for your reference. The specific analysis is as follows:
The 360 secure browser's fast kernel, the navigator.userAgent for non-360 websites is:
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1", all use native Google Chrome userAgent;
And 360's own website's navigator.userAgent is
: "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1 QIHU 360SE", which contains 360's own logo;
So it is difficult to know the 360 fast kernel during our own development process;
The following method is extracted from a plug-in in a front-end blog. This method can determine the fast kernel of 360 safe browser
Copy the code as follows: function is360se(){
var where = "suffixes", value = "dll", name = "description", nameReg = /fancy/;
var mimeTypes = window.navigator.mimeTypes, i;
for (i in mimeTypes) {
if (mimeTypes[i][where] == value) {
if (nameReg.test(mimeTypes[i][name])) return false;
}
}
return true;
}
I hope this article will be helpful to everyone's JavaScript programming.