Changes between Version 1 and Version 2 of Ticket #22244, comment 22
- Timestamp:
- 10/23/2012 09:58:38 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #22244, comment 22
v1 v2 1 > This would break because jQuery would be forced to the footer, while the other script would print in the header: 1 2 3 This is unfortunately a wontfix. Yes, loading scripts in the footer can mean more HTML gets downloaded first, though the difference is negligible and there are better ways to extract speed from a site. 4 5 But: Changing jQuery to load in the footer can instantly break JavaScript that previously worked. This can include JavaScript inserted directly into post content, or scripts loaded in the header or in the middle of the page, or scripts printed in the footer but before jQuery. 6 7 This would break because jQuery would be forced to the footer, while the other script would print in the header: 2 8 3 9 {{{ … … 6 12 }}} 7 13 8 I was thinking more of scripts that didn't use `wp_enqueue_script()` at all, but yeah, I've seen this pattern enough times to agree with you that it wouldn't be a good idea.14 It does not matter that dependencies should have been used. It is too late to make a change like this. Common practices sometimes beat out best practices. You can do this on your own site if you'd like, but we will not be making a change in core. Sorry. Most other scripts are registered for the footer, and including all of jQuery UI.