I believe it is incorrect in terms of semantics, and it makes inspecting the
tag a lot more difficult.script elements are allowed in the body (the body element allows "flow content" as children, which includes script elements). Placing script elements at the end of the body is useful to avoid blocking the HTML parser, which has to wait until the browser finishes downloading and executing the scripts that it encounters in the HTML.
Maybe we could move all script elements to the head and add the defer attribute but I'm not sure if that's a backwards compatible change or if/how it affects page load performance.
Hey @msavin @klaussner ,
<meteor-bundled-css />
Thanks, @dr-dimitru! Closing in favor of meteor/meteor-feature-requests#267.
Most helpful comment
scriptelements are allowed in thebody(thebodyelement allows "flow content" as children, which includesscriptelements). Placingscriptelements at the end of thebodyis useful to avoid blocking the HTML parser, which has to wait until the browser finishes downloading and executing the scripts that it encounters in the HTML.Maybe we could move all
scriptelements to theheadand add thedeferattribute but I'm not sure if that's a backwards compatible change or if/how it affects page load performance.