-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Abort script strategy logical checks when CONCATENATE_SCRIPTS
is true
#48
Comments
@10upsimon This makes sense. LGTM! |
Assigning to @joemcgill to please check ACs here. Once happy, we can get that issue moved to 'To Do' and formulate a plan for engineering alongside the remaining 'Milestone 3' issues please. |
This seems correct from my PoV too. Thanks, @10upsimon. |
@joemcgill @kt-12 @felixarntz I started looking into this, and after some confusion and core code hunting, I actually think there may be no work needed here.
Given that our work touches on the Please let me know if you feel I've missed the boat on this one, but I don't believe I have. |
I think we should also look into #57836 while looking at this issue. |
This seems fine for now given the current scope. I would like to see this feature expanded in the future to cover admin scripts as well so we can leverage it in wp-admin.
I'm not sure concatenation is still considered best practice given how browsers load resources these days, it would be worth considering changing this. |
I've spent some time reading through a lot of the logic that is effected by the Also, I have assumed that the changes we're making can also impact admin scripts if someone calls
This misses some of the additional complexities here:
|
Have you seen Core-57548 (Stop concatenating scripts and stylesheets in wp-admin and retire load-scripts.php and load-styles.php)? If script concatenation were removed entirely from core, this would seem to greatly simplify the considerations needed for Script Loading Strategies. The two changes could ship in the same release. |
+1 for removing these and killing them with fire. |
I would suggest we move this conversation over to the Trac ticket to get that moving. Discussing in this fork isn't really good for visibility, and also in terms of the script loading strategy work this fork is more or less retired now that there's the core PR WordPress#4391 and discussion and subsequent work is happening there. |
Description
Script concatenation, although rarely used, can be enabled in WordPress via the
CONCATENATE_SCRIPTS
config constant. When enabled, scripts will be concatenated by WordPress and served as a single response. This makes handling the script loading strategies at a per script level unfeasible. When script concatenation is enabled for a WordPress site, the script loading strategy should be treated as the defaultblocking
state.Acceptance Criteria
$args
array (where strategies are defined) and return early ifCONCATENATE_SCRIPTS
is defined astrue
.Unit Tests
blocking
for any/all script handles whenCONCATENATE_SCRIPTS
is defined astrue
.Designs
No response
Describe alternatives you've considered
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: