How to detect 360 browser via JS?
Tried a lot of methods, most of the online method is judged by navigator.useragent, which may be a few years ago, and now the 360userAgent output to Google, in addition to the rest of the same ...
Google: mozilla/5.0 (Windows NT 6.3; WOW64) applewebkit/537.36 (khtml, like Gecko) chrome/52.0.2743.116 safari/537.36
360 Speed: mozilla/5.0 (Windows NT 6.3; WOW64) applewebkit/537.36 (khtml, like Gecko) chrome/50.0.2661.102 safari/537.36
360 Security: mozilla/5.0 (Windows NT 6.3; WOW64) applewebkit/537.36 (khtml, like Gecko) chrome/45.0.2454.101 safari/537.36
However, in the 360 Web site output navigator.useragent, can determine the 360 speed and 360 Security browser:
360 Speed: "mozilla/5.0 (Windows NT 6.3; WOW64) applewebkit/537.36 (khtml, like Gecko) chrome/50.0.2661.102 safari/537.36 QIHU 360EE"
360 Security: "mozilla/5.0 (Windows NT 6.3; WOW64) applewebkit/537.36 (khtml, like Gecko) chrome/45.0.2454.101 safari/537.36 QIHU 360SE"
This is where the 360 pits are ....
Under other domain name detection, useragent return is all native Google browser useragent, and in 360 related domain name contains 360 own logo.
So now want to pass useragent to detect 360 is undetectable.
360 after changing the useragent, can not be recognized from the user agent, 360 browser to 8 (security 8 and the speed of 8), the version number with chrome and the upgrade, difficult to judge.
The other way of testing on the internet is almost impossible, it is not written out.
Accidentally found a mimetype (media type) that can be judged to be 360 browsers, type: "APPLICATION/VND. Chromium. Remoting-viewer "
In the 360 speed browser > Help > About 360 browser, pop up as follows: After testing, only 360 browsers will have the output chromium this identity, but also can not 100% determined that the detected must be 360 browser.
Post the Code:
1 <!DOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/TR/xhtml1/DTD/ Xhtml1-transitional.dtd ">2 <HTMLxmlns= "http://www.w3.org/1999/xhtml">3 4 <Head>5 <Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8" /> 6 <title>Browser detection</title>7 </Head>8 9 <Script>Ten window.onload= function () { One A //Application/vnd.chromium.remoting-viewer may be 360 unique - varis360=_mime ("type", "Application/vnd.chromium.remoting-viewer"); - the if(Ischrome ()&&is360) { - Alert ("detected to be 360 browser"); - } - } + //Check if it is Google Kernel (excluding 360 and Google browsers) - functionIschrome () { + varUA=navigator.userAgent.toLowerCase (); A at returnUa.indexof ("Chrome") > 1; - } - //Test MIME - function_mime (option, value) { - varmimetypes=navigator.mimetypes; - for (varMTinchmimetypes) { in if(Mimetypes[mt][option]==value) { - return true; to } + } - return false; the } * </Script> $ Panax Notoginseng <Body> - </Body> the + </HTML>
If you have any better ways, share it!
There seems to be no way to differentiate between 360 secure browser and 360 speed browser, hey ╮(╯▽╰)╭
360 Browser via JS detection