The Yahoo! Exceptional Performance team recommend placing scripts at the bottom of your page because of the way browsers download components.
Of course Levi’s comment “just before you need it and no sooner” is really the correct answer, i.e. “it depends”.
More Related Contents:
- Which “href” value should I use for JavaScript links, “#” or “javascript:void(0)”?
- Does the tag position in HTML affects performance of the webpage?
- javascript runs twice [closed]
- Tally value in dynamically generated textbox
- How can I tell if a DOM element is visible in the current viewport?
- Using HTML script tags to code while they have a source
- HTML5 Canvas Resize (Downscale) Image High Quality?
- Edit, save, self-modifying HTML document; format generated HTML, JavaScript
- Retrieving the text of the selected in element
- iOS JavaScript bridge
- How to check “checkbox” dynamically – jQuery Mobile
- How to make Internet Explorer emulate pointer-events:none?
- Integrating Dropzone.js into existing HTML form with other fields
- Dropdown select with images
- JavaScript: Extract video frames reliably
- Generic way to detect if html form is edited
- SecurityError: The operation is insecure – window.history.pushState()
- How to prevent submitting the HTML form’s input field value if it empty
- How to append timestamp to the javascript file in tag url to avoid caching
- CSS delivery optimization: How to defer css loading?
- Accessing localStorage from a webWorker
- JavaScript in or just before ?
- How can I find a user’s country using HTML5 geolocation?
- How to get a number value from an input field?
- HTML5 Video buffered attribute features
- How to show hidden divs on mouseover?
- Setting the height of a DIV dynamically
- How do I restrict past dates in HTML5 input type Date?
- Center an Image vertically and horizontally using CSS
- how to animate drawing lines on canvas