Browser loading strategy, <head>...<body>

Posted by Bin Chen on Stack Overflow See other posts from Stack Overflow or by Bin Chen
Published on 2011-01-01T11:38:25Z Indexed on 2011/01/01 11:54 UTC
Read the original article Hit count: 231

Filed under:
|

I am inspecting some interesting behaviors of browser, I don't know it's in standard or not. If I put everythin inside <head></head>, the browser will only begin to render the page after all the resouces in head is retrieved.

So I am thinking that put as little as possible things into head is one of the important website optimization techniques, is it right? My question is:

If I put script/css in body or other parts of the html, how can I know that script has been loaded successfully so that I will not be calling a undefined function?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about html