Opened 3 years ago
Closed 2 years ago
#53122 closed defect (bug) (wontfix)
Add dns-prefetch resource hint as fallback for Google Fonts preconnect
Reported by: | westonruter | Owned by: | westonruter |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.7 |
Component: | Bundled Theme | Keywords: | has-patch close |
Focuses: | performance | Cc: |
Description
In #37171 the use of the preconnect
resource hint was added for core themes that use Google Fonts. However, what was missing was also including the dns-prefetch
resource hint. The preconnect
resource hint is not supported by older browsers, so including dns-prefetch
ensures that they'll also get some performance benefit.
See MDN docs for Best Practices that recommend pairing preconnect
with dns-prefetch
.
Change History (9)
#4
@
3 years ago
Yeah, I'm not entirely clear on that either. But MDN recommends adding both, and dns-prefetch
will at least benefit IE11 if Firefox doesn't in fact support any longer. According to Andy Davies:
It appears that preconnect doesn't currently work in Firefox even though it's supposed to
See Firefox bug 1543990 opened 2 years ago.
#5
@
3 years ago
- Milestone changed from 5.7.2 to 5.7.3
WordPress 5.7.2 has been released, moving open tickets to 5.7.3
#6
@
3 years ago
- Milestone changed from 5.7.3 to 5.8
This will require new versions of the 2012-2017 default themes.
As this is a long-standing issue, in part caused by a browser bug, I'm going to bump it to the next major release as I don't think it warrants new theme versions alone and complicating the minor release process further.
#7
@
3 years ago
- Milestone changed from 5.8 to Future Release
Today is 5.8 Beta 1. No progress made in the cycle. As it's bumped multiple times and is a long standing issue (partly due to browser bug), punting to Future Release
.
#8
@
2 years ago
- Keywords close added
@westonruter Is this a change still worth making?
The only browser currently supported in Core (and the larger community now that IE11 has reached end of life) that does not support preconnect
is Firefox. Caniuse says it has not been supported since version 71 and Firefox is currently at version 102.
Firefox also only supports dns-prefetch
on HTTP origins. HTTPS is unsupported. 82%+ of active WordPress installs report using HTTPS, so it seems this would only benefit a small subset of sites.
Adding the close
suggestion, but if anyone feels strongly this should still be implemented it should be safe to add.
It's interesting that caniuse shows that
dns-prefetch
has 82.5% support, andpreconnect
has 90.5%. (part of that 90% is very recent)But it says that Firefox supported
preconnect
and then dropped it. Is that right?