Opened 10 years ago
Closed 9 years ago
#33210 closed enhancement (wontfix)
Add a preconnect header along with emoji settings JS
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.2 |
Component: | Emoji | Keywords: | |
Focuses: | performance | Cc: |
Description
Adding this to the header along with the _wpemojiSettings
script would tell browsers that support it (currently Chromium trunk and Firefox) to pre-connect to the CDN, getting DNS lookup and SSL negotiation out of the before it's actually needed.
On my connection, this was ~90ms, which would be saved on the time from DOMContentLoaded
to the first emoji render.
<link rel="preconnect" href="https://s.w.org">
Change History (7)
#2
@
10 years ago
Actually, that doesn't make much sense. I'm guessing preconnect
is intended for hosts of assets that aren't directly referenced in the <head>
already.
#3
in reply to:
↑ description
@
10 years ago
Replying to pento:
Was the ~90ms saved hard coding in HTML or adding via JavaScript once the result of ( ! settings.supports.simple || ! settings.supports.flag )
is known?
If it's added, adding it via JS while twemoji is running would avoid any ill-effects in browsers supporting emoji.
We could add generic support for every distinct host that gets enqueued with
wp_enqueue_*()
.