Error: “SEC7111: HTTPS security is compromised by (null)” error in IE11
I recently encountered an issue that a web page does not work in IE11 and throws exception “SEC7111: HTTPS security is compromised by (null)”.
By analyzing the page script, I found that IE threw the exception from document.write() function. This error shows up when you are running IE11 with document mode 9~11.
You can also reproduce this issue by following these steps:
1. Browse https://www.google.com in IE11.
2. Launch F12 developer toolbar and ensure the current document mode is greater than or equal to 9.
3. Execute following script in the console.
document.write(‘hello’);
4. The script fails to execute and throws the exception: “SEC7111: HTTPS security is compromised by (null)”:
Solutions:
1. Use the DOM manipulation API to control the DOM rather than document.write().
2. Add X-UA-Compatible meta tag or HTTP response header to force IE to run with legacy document mode: 5, 7, 8.
X-UA-Compatible meta tag:
<html> <head> <meta http-equiv="X-UA-Compatible" content="IE=8" /> ... </head> <body> </body> </html>
X-UA-Compatible HTTP response header:
After that, this error will be resolved.