Force IE Browser or WebBrowser control to display Web pages with the specified version

Source: Internet
Author: User

Force IE Browser or WebBrowser control to display Web pages with the specified version

Since the installation of IE10, found that a number of sites are not so normal, some of the features on the site unexpectedly will appear some unexpected bug--is aimed at IE development, now IE unexpectedly use up, let user sentiment why? But for a small number of users to use the system to go through the adjustment function, this is really a headache! After a toss-up, they found a very m$ way to fix it-forcing a higher version of IE to display the Web page in the low-version mode.

is to directly let IE10 default in the specified version of IE browser mode to run, and use this specified edition to parse the page, in the previous article defining document compatibility, we have actually known the browser mode and document mode differences, And we modify the browser's document mode by modifying the x-ua-compatible. This approach could have solved our current problems, but in fact, we didn't want the whole site to be IE8 or IE7, we just wanted to use IE8 for a few people on the core functionality. Of course, we can still use the meta-element on the page-but here we are looking for another solution: because the people who use the core features are controllable, and the number is small. Therefore, the direct control of IE, let the high version of the browser (version >=8) according to the specified low version of the mode to parse. The method is to directly adjust the registry key:

Code
12345 HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION或者HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION

Under Feature_browser_emulation This registry key, add a DWORD value with the name: iexplore.exe the value is decimal 8888 or 8000 . After saving, reopen IE browser (IE8 or higher), you will find that the browser is now using the IE8 mode is browsing.

This method is intended to be used to resolve applications that use the IE WebBrowser control with the support of a specific browser version. In that case, let's take a closer look at how to specify the browser version in our program if IE WebBrowser is used. In fact, if you have a heart, you can open any of the above two registry entries, you may be able to see that there are some values, these are the specific browser version of the program has been specified. For example, I have the following here:

Devenv.exe is the VS2010 application, and here we can see that the m$ force requires that the browser version used in devenv.exe be IE9. Since he is so used, naturally, we should be able to find a way to solve the problem. If you are using the IE WebBrowser control in the application: SomeApplication.exe, So if you want to SomeApplication.exe the WebBrowser control in this program to parse the page in a specific version of the browser, you can add your program to the above registry key. For example, if you want to specify to run for IE8, then you just create a new DWORD value with SomeApplication.exe the name, and the value is: you 8888 can.

We've already given browsers and controls a WebBrowser specific version of the browser to run, but maybe you'll find that there are some bad values behind it, so what do I do with IE? The same IE8 how there are 8000 and 8888 such values, what does it mean? If you have questions, then please look at the table below, Luo lists the commonly used numerical control table:

Value Description
10001 (0x2711) Internet Explorer 10. Web page in the IE 10 standard mode display, page! DOCTYPE invalid
10000 (0x02710) Internet Explorer 10. In IE 10 Standard mode, follow the page! DOCTYPE instructions to display the Web page. Internet Explorer 10 default value.
9999 (0x270f) Windows Internet Explorer 9. Force IE9 display, ignore! DOCTYPE directive
9000 (0x2328) Internet Explorer 9. Internet Explorer 9 Default value, in IE9 Standard mode, follow the page! DOCTYPE instructions to display the Web page.
8888 (0X22B8) Internet Explorer 8, Force IE8 Standard mode display, ignore! DOCTYPE directive
8000 (0X1F40) Internet Explorer 8 default settings, in IE8 Standard mode, follow the page! DOCTYPE Command Display Web page
7000 (0x1b58) Use the default values used by the WebBrowser control application in IE7 Standard mode on the Web page! DOCTYPE instructions to display the Web page.
Feature_browser_emulation Setup Instructions

Note:

1. The quasi-mode refers to the browser mode, and! DOCTYPE control is the document mode.

2. When the WebBrowser control controls are included in the application, the default WebBrowser uses IE7, which is an important point of knowledge.

Well, to this should be for IE running in the specified version of the method has been introduced, at the same time, its own program how to set the method also has a clear direction, the next thing is--use it up.

Reference Document: Internet Feature Controls (B.. C

Transferred from: http://blog.useasp.net/archive/2013/05/30/ Force-ie8-or-higher-or-webbrowser-control-use-specific-version-to-display-pages.aspx

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.