WordPress.org

Make WordPress Core

Changes between Version 3 and Version 4 of Ticket #12009, comment 75


Ignore:
Timestamp:
04/12/2020 02:29:35 AM (8 months ago)
Author:
azaozz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12009, comment 75

    v3 v4  
    2828 - It doesn't make sense to add `defer` to the default scripts that may be used as dependencies (that's most of them). The reason is that in production where scripts are concatenated `defer` can only be used when all concatenated scripts have it.
    2929 - Default scripts that are not used as dependencies can have `defer`. However they either have to be concatenated separately, or outputted individually.
    30  - Scripts added by plugins can have `defer` if they are not used as dependencies, or when all of their dependencies also have `defer`.
     30 - Scripts added by plugins can have `defer` if they are not used as dependencies, or when all of their dependent scripts also have `defer`.
    3131 - The inline scripts that are outputted "after" will also need the `defer` attribute. It would be nice to also add `defer` to the "before" scripts but that's not critical.
    3232