WordPress.org

Make WordPress Core

Opened 8 weeks ago

Last modified 2 weeks ago

#53122 assigned defect (bug)

Add dns-prefetch resource hint as fallback for Google Fonts preconnect

Reported by: westonruter Owned by: westonruter
Milestone: Future Release Priority: normal
Severity: normal Version: 4.7
Component: Bundled Theme Keywords: has-patch
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 (7)

#1 @westonruter
8 weeks ago

  • Owner set to westonruter
  • Status changed from new to assigned

#2 @westonruter
8 weeks ago

  • Keywords has-patch added

#3 @joyously
8 weeks ago

It's interesting that caniuse shows that dns-prefetch has 82.5% support, and preconnect has 90.5%. (part of that 90% is very recent)
But it says that Firefox supported preconnect and then dropped it. Is that right?

#4 @westonruter
8 weeks 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 @dd32
6 weeks 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 @peterwilsoncc
5 weeks 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 @hellofromTonya
2 weeks 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.

Note: See TracTickets for help on using tickets.