javascript – Where is the best place to include js files on a page?


I usually include js in head. But in Bootstrap it's all connected at the end… Perhaps there is some sense in this? Maybe someone knows?


It is better to include JavaScript at the end, because script loading time can be put to good use in page styling, which is what bootstrap actually does. Many browsers render content as the page loads, and by putting the JS includes at the end, we speed up the rendering of styles and everything that is included before that.

Scroll to Top