WordPress.org

Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #12009, comment 75


Ignore:
Timestamp:
04/12/2020 12:05:10 AM (11 months ago)
Author:
azaozz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12009, comment 75

    v1 v2  
    44
    55- Manage loading order. When a script tag is outputted, make sure all of its dependencies are outputted before it. When scripts are concatenated, reorder them so dependencies are before dependents.
    6 - Concatenate the default scripts in production. This is a really nice speed increase for HTTP/1.1, but doesn't make difference for HTTP/2.
     6- Concatenate the default scripts in production. This is a really nice page load speed increase for HTTP/1.1, but doesn't make difference for HTTP/2.
    77
    88Additional functionality:
     
    3333A possible way to support `defer` would be to split the footer queue in two then concatenate and output the scripts without `defer`, and then either output the scripts with `defer` individually or concatenate them and output them in another script tag.
    3434
    35 However Script Loader won't be able to output the deferred scripts in the HTML head. In some cases scripts may e added to the footer queue mid-page. When that happens, and the script doesn't have `defer`, and one of its dependencies is already outputted in the head with `defer`, the script will most likely fail to initialize correctly.
     35However Script Loader won't be able to output the deferred scripts in the HTML head. In some cases scripts may be added to the footer queue mid-page. When that happens, and the script doesn't have `defer`, and one of its dependencies is already outputted in the head with `defer`, the script will most likely fail to initialize correctly.