Scripts should be included in the <head>
part is what I learned from w3c.
Why does Boostrap suggest to load itself in the <body>
part as seen here:
Scripts should be included in the <head>
part is what I learned from w3c.
Why does Boostrap suggest to load itself in the <body>
part as seen here:
Scripts are technically supposed to be loaded and executed at where they are placed in the body. Imagine that your browser reads your HTML from top to bottom. If the script include is at the top of the document, then the browser is supposed to idle while it fetches the script from the web server.
A more detailed answer is available at
Unobtrusive JavaScript: <script> at the top or the bottom of the HTML code?
if the loading script is at the bottom of the body tage then it will be loaded last, making the rest of the page appear as if it is loaded faster
That really depends on that is on your page. If your page has things that need the js in order to work before displaying to the user, it would be wiser to load them before showing the html to the user