[wp-trac] [WordPress Trac] #42438: Add support for preload links (similar to resource hints)

WordPress Trac noreply at wordpress.org
Fri Aug 5 16:49:24 UTC 2022


#42438: Add support for preload links (similar to resource hints)
-------------------------------------------------+-------------------------
 Reporter:  nico23                               |       Owner:  swissspidy
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  6.1
Component:  Script Loader                        |     Version:  4.9
 Severity:  normal                               |  Resolution:
 Keywords:  has-unit-tests has-patch commit      |     Focuses:
  needs-dev-note                                 |  performance
-------------------------------------------------+-------------------------

Comment (by adamsilverstein):

 [attachment:"42438.3.diff"] improves the docblock, explaining that
 preloads should not be used with non-render-blocking elements.

 For the imperative API suggestion, we can probably add a
 `$wp_preload_resources` global set with calls to `wp_add_preload_link`,
 then use that as the default value for the filter in
 `wp_preload_resources`. I'll work on a follow up for that.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/42438#comment:60>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list