#8628 closed enhancement (fixed)
Extend class WP_Scripts to support concatenating, compressing and printing scripts in the HTML head and the footer
Reported by: | azaozz | Owned by: | |
---|---|---|---|
Milestone: | 2.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Description
Many Javascript functions can be loaded in the footer, making the page load faster. Perhaps we can split the current script queue in "head" and "foot" sections and use an extra param when queueing scripts. That way all dependencies and loading order would be preserved.
Alternatively can have two queues and exclude all dependency satisfying scripts that have been loaded in the "head" queue from the "foot" queue.
Attachments (5)
Change History (18)
#3
@
16 years ago
- Summary changed from Extend class WP_Scripts to print scripts in both the HTML head and the footer to Extend class WP_Scripts to support concatenating, compressing and printing scripts in the HTML head and the footer
#8
@
16 years ago
Farbtastic completely breaks this script loader.
Steps To Reproduce:
- Download and activate my Video Quicktags plugin: http://wordpress.org/extend/plugins/vipers-video-quicktags/
- Visit Settings -> Video Quicktags in Firefox 3. Note page is there for a moment and then disappears. Disabling JS makes it appear fine.
- Comment out
wp_enqueue_script( 'farbtastic', ...
line in plugin. Page works as expected.
Checking JS error console shows these errors:
Error: S.documentElement is null Source File: http://localhost/wordpress-dev/wp-admin/load-scripts.php?c=1&load=jquery,utils&ver=960edfac60367b8ae4d41cab123ae351 Line: 19
Error: document.body is null Source File: http://localhost/wordpress-dev/wp-admin/load-scripts.php?c=1&load=jquery,utils&ver=960edfac60367b8ae4d41cab123ae351 Line: 19
This ticket was mentioned in Slack in #core-editor by youknowriad. View the logs.
6 years ago
Note: See
TracTickets for help on using
tickets.
We should have only one queue. By that I mean only one WP_Scripts object. An extra parameter ought to work fine