Whats Pros and Cons: putting javascript in head and putting just before the body close

Posted by Amr ElGarhy on Stack Overflow See other posts from Stack Overflow or by Amr ElGarhy
Published on 2010-03-16T00:32:06Z Indexed on 2010/03/16 0:39 UTC
Read the original article Hit count: 325

Most of javascript and web development books/articles says that you must put CSS in the head tag and javascript at the bottom of the page.

But when i open html source of famous websites such as this one stackoverflow, i find they put some js files in the head tag.

Whats Pros and Cons of both approaches and when to use which?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about web-development