How to set FEATURE_BROWSER_EMULATION in IE8 mode?

We use the built-in SWT browser in the Java application. A SWT browser wraps the IE8 WebBrowser control object. I ran into a known issue, which by default, WebBrowser Control uses IE7 mode instead of IE8 mode. (See http://blogs.msdn.com/b/ie/archive/2009/03/10/more-ie8-extensibility-improvements.aspx )

In this and other articles, I am trying to set the FEATURE_BROWSER_EMULATION registry value for my application so that the browser uses IE8 mode by default, but I have mixed success. Setting it to IE8 standards mode using a value of 8000 does not work, but setting it to IE8 standards "forced" mode using a value of 8888.

I test this by loading the page in a SWT browser and then doing javascript

browser.execute("alert(document.documentMode);"); 

The result is 7 if the key value does not exist or equal to 8000. The result is 8 if the key value is 8888. I am testing the URL /qaru.site / ... , which includes the following

 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 

Does anyone know what I'm doing wrong?

+4
source share
3 answers
  • HKCU \ Software \ Microsoft \ Internet Explorer \ Main \ FeatureControl \ FEATURE_BROWSER_EMULATION
  • Your process name is added, then set the DWORD value to 9999
+4
source

First check this solution:

Regarding the management of IE9 WebBrowser

if this does not fit your needs, here is a registry solution


To start the WebBrowser control in IE11 standard mode, use the following new value in the registry:

 32 bits: [(HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE)\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION] 64 bits: [(HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE)\Software\wow6432node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION] "DesignU.exe" = dword 11000 (Hex: 0x2af8) 

To start the WebBrowser control in IE10 standard mode, use the following new value in the registry:

 32 bits: [(HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE)\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION] 64 bits: [(HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE)\Software\wow6432node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION] "DesignU.exe" = dword 10000 (Hex: 0x2710) 

To start the WebBrowser control in IE9 standard mode, use the following new value in the registry:

 32 bits: [(HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE)\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION] 64 bits: [(HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE)\Software\wow6432node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION] "DesignU.exe" = dword 9000 (Hex: 0x2328) 

To start the WebBrowser control in IE8 standard mode, use the following new value in the registry:

 32 bits: [(HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE)\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION] 64 bits: [(HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE)\Software\wow6432node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION] "DesignU.exe" = dword 8000 (Hex: 0x1F40) 

To start IE7 in standard mode, use the following registry value:

 32 bits: [(HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE)\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION] 64 bits: [(HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE)\Software\wow6432node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION] "DesignU.exe" = dword 7000 (Hex: 0x1B58) 
+2
source

Check compatibility view settings in stand-alone IE (Tools> Compatibility View Settings). Is your page displayed on sites displayed in the compatibility view list, or the "show all sites in compatibility mode" checkbox? With this reg value set to 8000, web browser controls still differ in compatibility view settings.

+1
source

Source: https://habr.com/ru/post/1332289/


All Articles