Opened 16 months ago

Closed 6 weeks ago

Last modified 6 weeks ago

#6769 closed enhancement (fixed)

Plugin pages should prewarm

Reported by: jonoaldersonwp's profile jonoaldersonwp Owned by: dd32's profile dd32
Milestone: Priority: normal
Component: Plugin Directory Keywords: seo performance

Description (last modified by jonoaldersonwp)

Plugin pages like are often slow to load.

As an easy win, we can pre-warm the connection to and, which host various resources for the page.

To do this, we should add the following meta tags:

<link rel="dns-prefetch" href="">
<link rel="preconnect" href="">
<link rel="dns-prefetch" href="">
<link rel="preconnect" href="">

Change History (6)

#1 @jonoaldersonwp
16 months ago

  • Description modified (diff)

#2 @dd32
16 months ago

Is both preconnect and dns-prefetch required? Doesn't preconnect infer dns-prefetch?

Any change related to should probably be done globally, not specifically for the plugin directory. Especially if we were to put the CDN to proper use;

We probably don't want to add a preconnect to either, as the majority of resources served from there are expected to be cached.

A dns-prefetch for seems sane, but again, preconnect feels like it might be a bit too aggressive.

#3 @jonoaldersonwp
16 months ago

Browsers which don't support preconnect will fall back to dns-prefetch gracefully when both are included, and preconnect 'includes' dns-prefetch. So having both is good practices.

I'd be nervous about doing this globally, as there's a cost to (either) hint if/when it's not used.

We should do this regardless of caching, as the browser still needs to do the HTTPS handshake, etc, and getting that started sooner saves a bunch of time.

#4 @jonoaldersonwp
16 months ago

I'd be nervous about doing this globally, as there's a cost to (either) hint if/when it's not used.

*If there are other places these are hit, then I'd love to do it there, too. I'd just started with these locations as easy wins.

#5 @dd32
6 weeks ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from new to closed

In 13674:

Plugin Directory: Add resource hints for dns-prefetch.

Fixes #6769.

#6 @dd32
6 weeks ago

I can't find anywhere else where we're using preconnect on, other than for Google fonts, and I'm hesitant to add preconnects here as it's plausible that all the resources being fetched from the CDNs are locally cached.

Note: See TracTickets for help on using tickets.