Javascript-how does one implement the Microsoft edge browser compatibility prompt?

Source: Internet
Author: User
Tags microsoft edge
How does one implement such webpage prompts in the Microsoft EDGE browser? PS. It is prompted by the edge browser rather than webpage navigation. & Amp; lt; metahttp-equiv & quot; X-UA-Compatible & quot; content & quot; IE7, 9, 10, 11 & quot; & amp; gt; I tried.

How does one implement such webpage prompts in the Microsoft EDGE browser?
PS. It is prompted by the edge browser rather than webpage navigation.

Header I tried.

Reply content:

How does one implement such webpage prompts in the Microsoft EDGE browser?
PS. It is prompted by the edge browser rather than webpage navigation.

Header I tried.

1.
Edge implements this prompt, not based on any specific page content, but Microsoft maintains a compatibility list in the cloud. Edge downloads and updates the list from time to time. As mentioned in the source code of the interface, there are several triggering conditions:

    // Returns the code for why we navigated to NeedIE:    // 0 = No transition/Error    // 1 = EMIE Site List    // 2 = Intranet Policy is set    // 3 = Cloud CV List    // 4 = Keep in Spartan

2.
You can achieve this through JS. After detecting the Edge browser, you can jump to a page you have created, and copy the page content displayed by edge to change it. Look, it is a common HTML page. You can take out the page code and CSS file through the console, you can make the same effect on your own, even if your website is not on the Microsoft list, it can achieve the same effect, but I don't know if there will be any copyright issues. If you are worried about copyright issues, you can refer to its ideas, customize one by yourself. In fact, the magic is that "open in Internet Explorer" is actually implemented in this way:

    LaunchIE = function (automated)    {        window.external.LaunchIE(getFullUrl(), automated);    }

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.