[wp-trac] [WordPress Trac] #42438: preload is missing from ressource hints.
WordPress Trac
noreply at wordpress.org
Sun Apr 1 18:29:20 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: has-patch needs-unit-tests | Focuses:
----------------------------------------+-------------------------
Comment (by igrigorik):
Hey folks! Would love to see preload available in core. A couple of drive-
by thoughts..
Resource Hints [1] and Preload [2] have different semantics; Resource
Hints != Preload.
- dns-prefect, preconnect, prefetch, prerender are speculative
optimization hints
- preload is a ''directive'' to the UA to fetch the resource
Addy Osmani has a nice writeup on the differences [3]. My recommendation
would be to keep Preload and RH as separate APIs, because they have
different processing behavior and attributes. Case in point, current
wp_resource_hints() exposes "as" attribute, but that only applies to
rel=preload resources. On a related note "pr" attribute is now deprecated,
so that can be removed from the function as well.
Concretely, I'd propose...
1. Do some cleanup on wp_resource_hints() to remove "pr" and "as".
1. Expose new wp_preload() function to emit preload links.
WDYT? Crazytalk? :)
---
[1] https://w3c.github.io/resource-hints/
[2] https://w3c.github.io/preload/
[3] https://medium.com/reloading/preload-prefetch-and-priorities-in-
chrome-776165961bbf
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42438#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list