Internet Explorer 8 gives the following incorrect warning: ‘Do you want to view only the webpage content that was delivered securely?’
{{{
// Causes mixed content message in IE on a secure page
document.write("");
document.getElementById("__ie_onload").onreadystatechange = function()
{
if (this.readyState == "complete") domReady();
};
}}}
It’s a trick used to emulate a DOMContentLoaded event in IE. A security warning occurs because of the use the “javascript:” protocol even though no download occurs.
The fix is to use //: in the src attribute in the same way as popular javascript libraries such as jQuery and prototype. This does cause a harmless ERROR_INVALID_URL entry in HttpWatch, but it avoids the mixed content message:
{{{
// Does not cause a mixed content message in IE on a secure page
document.write("");
document.getElementById("__ie_onload").onreadystatechange = function()
{
if (this.readyState == "complete") domReady();
};
Internet Explorer 8 gives the following incorrect warning: ‘Do you want to view only the webpage content that was delivered securely?’
{{{
// Causes mixed content message in IE on a secure page document.write(""); document.getElementById("__ie_onload").onreadystatechange = function() { if (this.readyState == "complete") domReady(); };
}}}
It’s a trick used to emulate a DOMContentLoaded event in IE. A security warning occurs because of the use the “javascript:” protocol even though no download occurs.
The fix is to use //: in the src attribute in the same way as popular javascript libraries such as jQuery and prototype. This does cause a harmless ERROR_INVALID_URL entry in HttpWatch, but it avoids the mixed content message:
{{{
// Does not cause a mixed content message in IE on a secure page document.write(""); document.getElementById("__ie_onload").onreadystatechange = function() { if (this.readyState == "complete") domReady(); };
}}}
(Citation from: http://blog.httpwatch.com/2009/09/17/even-more-problems-with-the-ie-8-mixed-content-warning/ )