[wp-trac] [WordPress Trac] #37240: Remove schemes from dns-prefetch resource hint outputs
WordPress Trac
noreply at wordpress.org
Thu Jul 7 10:55:42 UTC 2016
#37240: Remove schemes from dns-prefetch resource hint outputs
----------------------------------------+-----------------------------
Reporter: niallkennedy | Owner: voldemortensen
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 4.6
Component: General | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests | Focuses: performance
----------------------------------------+-----------------------------
Changes (by swissspidy):
* keywords: has-patch has-unit-tests commit => has-patch needs-unit-tests
Comment:
The [https://w3c.github.io/resource-hints/ specification] isn't clear
about the schemes and uses protocol-relative URLs or relative URLs
everywhere in the examples.
For Chromium, it doesn't matter whether it's `//` or `http://`:
> The double slashes indicate that the URL starts with a host name (as
specified in RFC 1808). It is equivalent (but unnecessary) to use a full
URL such as "http://host_name_to_prefetch.com/".
Source: https://www.chromium.org/developers/design-documents/dns-
prefetching
That's also the impression I got when looking at the Webkit source code.
The only benefit I see is that we'd be able to filter out duplicates
(which the browser would probably do anyway). As per the ticket
description, wordpress.org, http://wordpress.org, https://wordpress.org
should all have the same DNS lookup and therefore only need 1 entry.
We need a unit test to cover this.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37240#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list