[wp-trac] [WordPress Trac] #34292: Support for DNS Prefetching & Prerender

WordPress Trac noreply at wordpress.org
Mon Jul 4 12:23:27 UTC 2016


#34292: Support for DNS Prefetching & Prerender
-------------------------------------------------+-------------------------
 Reporter:  bhubbard                             |       Owner:
     Type:  feature request                      |  voldemortensen
 Priority:  normal                               |      Status:  closed
Component:  Script Loader                        |   Milestone:  4.6
 Severity:  normal                               |     Version:
 Keywords:  has-patch has-unit-tests needs-dev-  |  Resolution:  fixed
  note needs-docs                                |     Focuses:
                                                 |  performance
-------------------------------------------------+-------------------------
Changes (by GaryJ):

 * keywords:  has-patch has-unit-tests needs-dev-note => has-patch has-unit-
     tests needs-dev-note needs-docs


Comment:

 `wp_resource_hints_scripts_styles()` doesn't seem like a suitable function
 name. This function looks through registered scripts and styles and
 returns the unique hosts - that's it. The function name should reflect
 that, to make it descriptive for re-use in other contexts. The fact it's
 only currently used in core for `wp_resource_hints()` shouldn't be a
 factor.

 The description also seems off for what this function does, and it's
 missing a `@return` tag.

 The function also seems to look through all ''registered'' scripts and
 styles, even if they may not be ''enqueued'' (used)? Is that correct?

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


More information about the wp-trac mailing list