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

WordPress Trac noreply at wordpress.org
Thu Jul 7 18:24:16 UTC 2022

#42438: Add support for preload links (similar to resource hints)
 Reporter:  nico23          |       Owner:  swissspidy
     Type:  defect (bug)    |      Status:  assigned
 Priority:  normal          |   Milestone:  6.1
Component:  Script Loader   |     Version:  4.9
 Severity:  normal          |  Resolution:
 Keywords:  has-unit-tests  |     Focuses:
Changes (by azaozz):

 * keywords:  has-patch has-unit-tests => has-unit-tests


 Replying to [comment:36 peterwilsoncc]:
 > I think using the existing code in `wp_resource_hints` would be better.

 Same, and also...

 > it's not possible to coordinate between preload and hinting to avoid
 double ups.

 Think that fixing this is quite important.
 - What happens when the same resource is "hinted" and "preloaded". Would
 that "confuse" the browser in some way? If not, still thinking duplication
 shouldn't happen at least for optimization.
 - Lets assume hints will be outputted first, how do we stop preloading the
 same stuff?

 > If anyone feels strongly enough that there is a better name that can
 encompass both hinting and instructing the browser, the the existing name
 can be deprecated.

 Yes, thinking the two should actually be merged and form the same API as
 both code and functionality is pretty close.

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

More information about the wp-trac mailing list