Javascript judges the chrome kernel's 360 browser

Source: Internet
Author: User

Http://loo2k.com/blog/detect-chrome-core-360-browser/

 

As we all know, 360 browsers (including secure browsers and speed browsers) disguise their useragent as chrome or Internet Explorer, as a result, front-end engineers cannot make correct judgments when performing differentiated processing on browsers.

If you do not know why the 360 browser disguise your useragent as another browser, I can refer to the answer in zhihu: "The 360 browser share dropped from July 2012 in 22.53% to September in 2.44%. Why? 」, This section describes the history of modifying the useragent in the browser 360.

The main purpose of this article is to introduce how to determine the chrome kernel's 360 browsers (including the 360 secure browser overspeed version and 360 browser speed version ), 5.0 version of the IE kernel can refer to the method provided by the http://segmentfault.com/q/1010000000117437 (but this method has expired on the speeding version 6.0 ).

This method determines whether the browser is a chrome 360 browser based on the reason why the 360 browser uses a different flash plug-in from the Chrome browser.

It is the flash plug-in information in the 360 speed browser (same as the 360 security browser:

For the chrome flash plug-in information:

I don't know the difference between the flash plug-ins in the browser. The 360 browser plug-in is described as "Adobe Flash Movie", and the Chrome browser plug-in is described as "Shockwave Flash 」. Then, you know...

Determine the chrome kernel's 360 browser:

function isChrome360(){if( navigator.userAgent.toLowerCase().indexOf('chrome')>-1){var desc = navigator.mimeTypes['application/x-shockwave-flash'].description.toLowerCase();if( desc.indexOf('adobe')>-1){returntrue;}}returnfalse;}alert(isChrome360());

Currently, the only thing that comes to mind is Chrome's judgment. If you have time to do so, let's take a look at how the 360 browser judges how to use the IE kernel.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.