[wp-trac] [WordPress Trac] #22244: jQuery should register in footer by default
WordPress Trac
noreply at wordpress.org
Sun Oct 21 19:25:54 UTC 2012
#22244: jQuery should register in footer by default
--------------------------------------+-------------------------
Reporter: ryanve | Type: enhancement
Status: new | Priority: normal
Milestone: Awaiting Review | Component: Performance
Version: | Severity: normal
Keywords: needs-patch dev-feedback |
--------------------------------------+-------------------------
jQuery is not needed on a page until just before the first script that
depends on it. If scripts dependent on jQuery are registered properly via
`wp_register_script()` or `wp_enqueue_script()`, then the script
dependency system is smart enough to know where to load jQuery. Therefore
jQuery should be registered in the footer by default (allowing the script
dependency system to do its magic). This simple change can be made in wp-
includes/script-loader.php in `wp_default_scripts()` and will no doubt
improve performance on lots of sites. There may be some other default
scripts that would benefit from this change too.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22244>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list