Opened 11 years ago
Closed 10 years ago
#33210 closed enhancement (wontfix)
Add a preconnect header along with emoji settings JS
| Reported by: | pento | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Emoji | Version: | 4.2 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | performance |
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
@
11 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
@
11 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
We could add generic support for every distinct host that gets enqueued with
wp_enqueue_*().