No, it can be anywhere. In fact, it’s sometimes a good idea to put it at the bottom of the document. For an explanation why, see http://developer.yahoo.com/performance/rules.html#js_bottom.
More Related Contents:
- Preserve browser window aspect ratio while shrinking [closed]
- Remove element from JS injected HTML
- Format number to always show 2 decimal places
- Is it bad practice to have a constructor function return a Promise?
- Detecting input change in jQuery?
- how to get GET and POST variables with JQuery?
- How do I convert an integer to binary in JavaScript?
- getting the reason why websockets closed with close code 1006
- jquery beforeunload when closing (not leaving) the page?
- How do I send an AJAX request on a different port with jQuery?
- How to rotate a 3D object on axis three.js?
- Programmatically trigger “select file” dialog box
- Promise All with Axios
- Object doesn’t support this property or method Rails Windows 64bit
- How to get browser width using JavaScript code?
- react-router getting this.props.location in child components
- Aggregation filter after $lookup
- How can I determine the current line number in JavaScript?
- “Scroll” to the very right of a long text input
- JavaScript Array splice vs slice
- Add commas or spaces to group every three digits
- Can I use webpack to generate CSS and JS separately?
- Detect input value change with MutationObserver
- How to print React component on click of a button?
- var let is ok but let let isn’t?
- Javascript Invalid Date Error in Internet Explorer
- Is there a limit on the size of a string in JSON with Node.js?
- Fire oninput event with jQuery
- Phantom JS synchronous AJAX request : NETWORK_ERR: XMLHttpRequest Exception 101
- Want to have an event handler for the browser’s back button with next.js