Some state of page is
“loading” :- when page is still loading and script is executed.
“interactive” :- when page is finished parsing but still loading sub-resources.
“completed” :- page is completely loaded.
check a little demo at http://f1beta.com/demo/document.readyState.html