Possible Duplicate:
How exactly does <script defer=“defer”> work?
Can anybody explain me how defer works?
As example how following code will work:
document.write("<script id=__ie_onload defer " + ((location.protocol == "https:") ? "src='javascript:void(0)'" : "src=//0") + "><\/script>")
And why using different value of src for different protocol?
deferis an IE attribute that tells the browser to delay the execution of the script.http://www.w3.org/TR/html4/interact/scripts.html#h-18.2.1
“When set, this boolean attribute provides a hint to the user agent that the script is not going to generate any document content (e.g., no “document.write” in javascript) and thus, the user agent can continue parsing and rendering.”