I found this nice post at kirupa.com, but I\'d like to understand in deep the order of load, rendering and execution of elements like DOM, Scripts, CSS, Images, IFrames, etc
I believe the order is something like this:
window.addEventListener("DOMContentLoaded", doStuff, true);
$(document).ready(function(){ ... });
window.addEventListener("load", doStuff, true);
Note that the execution order of scripts that are dynamically added to your page (by other scripts) is complicated and basically indeterminate. (See the answers here load and execute order of scripts)