[wp-trac] [WordPress Trac] #42438: preload is missing from ressource hints.

WordPress Trac noreply at wordpress.org
Wed Aug 1 14:39:11 UTC 2018


#42438: preload is missing from ressource hints.
------------------------------------------+-------------------------
 Reporter:  nico23                        |       Owner:  swissspidy
     Type:  defect (bug)                  |      Status:  assigned
 Priority:  normal                        |   Milestone:  5.0
Component:  Script Loader                 |     Version:  4.9
 Severity:  normal                        |  Resolution:
 Keywords:  needs-unit-tests needs-patch  |     Focuses:
------------------------------------------+-------------------------

Comment (by igrigorik):

 Replying to [comment:7 westonruter]:
 > I think `wp_preload_links` would be marginally better name for this
 function/filter. A benefit to having a separate function as you proposed
 is that it simplifies the filter.

 Thumbs up for `wp_preload_links`. I'll defer on the shape of the WP
 function to the other experts here though. :-)

 > Stepping back a bit: what in WordPress core today would benefit from
 preload links? We should have some good use cases in core (or bundled
 themes) prior to adding this.

 There's a lot of good content — e.g., see (1), (2), (3) — on various
 preload use cases that can be useful within core and themes. I'll just
 highlight a few...

 - early load of late discovered resources: fonts, stylesheets, hero
 images, media, etc.
 - decoupling fetch and execution: simple "async CSS" (with help of
 onload), manual scheduling of JS parse+execute, etc.
 - as a mechanism to signal H2 push to servers/CDNs

 Not an exhaustive list, but I believe each of the above has definite use
 cases in WP ecosystem.

 ----

 1. https://developer.mozilla.org/en-US/docs/Web/HTML/Preloading_content
 1. https://www.smashingmagazine.com/2016/02/preload-what-is-it-good-for/
 1. https://developers.google.com/web/updates/2016/03/link-rel-preload

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


More information about the wp-trac mailing list