Opened 5 years ago
Closed 4 years ago
#5072 closed enhancement (fixed)
Forum posts should prefetch gravatar.com
Reported by: | jonoaldersonwp | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Support Forums | Keywords: | seo performance |
Cc: |
Description
Forum posts, such as https://wordpress.org/support/topic/fb-login-doesnt-work-mobile/, load user a JS file (gprofiles.js) from gravatar.com. This is a cold connection to an external domain, and as such is noteably slow.
We should address this by adding a DNS prefetch tag to the <head>
, as follows: <link rel='dns-prefetch' href='//gravatar.com' />
Change History (3)
#2
@
5 years ago
Oh, excellent work! Yeah, let's kill that everywhere we can. Should have a big impact.
Let's avoid adding a global prefetch for now; it'll impact performance on pages where we're not loafing Gravatar stuff (and I'm also wondering if we should ditch the secure
subdomain to reduce the number of different domain lookups).
Note: See
TracTickets for help on using
tickets.
Is
gprofiles.js
used solely for Gravatar hovercards? If so, then do we even need this script reference?The only place that I can think of that uses hovercards is the wporg-breathe theme (used for the Make sites). That theme includes the JS file itself via
https://secure.gravatar.com/js/gprofiles.js
(courtesy of Jetpack) (in the code below you can see how the globalgprofiles.js
is excluded due to 'grofiles-cards' being queued).Other places that display Gravatars are the support forum individual topic pages, individual plugin pages, and individual profile pages. In all cases, a Gravatar image from
//secure.gravatar.com
is used without hovercard support.Locally I removed the following lines from the (closed-source) global
header.php
file and haven't noticed any difference so far in behavior regarding Gravatar functionality around the ecosystem.Am I overlooking something?
Seems we can:
gprofiles.js
<link rel='dns-prefetch' href='//secure.gravatar.com' />
(Should this be done simply for everywhere in an unconditional basis via the global header, or on a site-by-site basis depending on Gravatar usage?)