-
Notifications
You must be signed in to change notification settings - Fork 800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use preconnect resource hint instead of dns-prefetch #10780
Comments
I like that suggestion, although I am not sure we should pick something that is not supported by IE11. @dereksmart What's your take on this? |
To be clear, nothing will break in IE11. It'll just not perform the optimizations that other browsers would. |
as was mentioned above, if you use a header preconnect, prefetch, preload and the browser doesn't support it the browser will simply skip over the tag. There is no negative for including it in this case. However, IE 11 does support prefetch and preconnect does the DNS prefetching as well. So my question would be would the DNS prefetch simply go away, or would it stay because it's effectively doing nothing when you're using the preconnect header but if you take it away you impact performance for IE 11 users. |
Theoretically, there shouldn't be a negative effect to sending both |
We shouldn't be doing So when we DO neet to add |
This issue has been marked as stale. This happened because:
No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation. |
Going to upgrade to using WP functionality in #16305. I'm open to adding in For Photon, it makes sense when there are images present (at least) to preconnect. The negative is extra network requests if we include it when there aren't images present. Anything else I'm missing before hacking on it a bit? |
Can you check to see if images are likely going to be on the page before adding The logic may be the same as as determining whether an image should get |
It is time to add IE browser is too old and not supported now. |
Noting for IE, we will be deprecating IE 11 support in the next couple of months so IE is not an issue See p1HpG7-c8n-p2 |
IE 11 is history. I think this is unblocked 😄 |
Thinking aloud -- For cases like comments, likes, videopress shortcode, etc, just because comments are enabled, they're only loaded on posts that have commented enabled, etc. Generally, would |
@kraftbj yes, that makes sense. Ideally there should only be Optimization Detective and it's extension plugins—Embed Optimizer and Image Prioritizer—are part of Performance Lab from the Core Performance Team. They are being developed as feature plugins for a possible future core merge. In the meantime, perhaps Jetpack Boost could leverage them to implement performance enhancements like conditional preconnects? |
When looking at the network waterfall of a Jetpack-powered site, @yoavweiss identified that the header image (served by Photon) could have been loaded earlier if there was a
preconnect
resource hint fori0.wp.com
.I did find that there are
dns-prefetch
hints for such domains:jetpack/modules/photon.php
Lines 16 to 20 in 379a938
I see that this code was added 4 years ago, so this explains why
dns-prefetch
then was used is becausepreconnect
wasn't even around at that time. (Andpreconnect
isn't supported in IE11.)While #10352 updates Jetpack to use
wp_resource_hints
(which weren't available back then either), it continues to usedns-prefetch
rather than updating to use thepreconnect
resource hint. Shouldpreconnect
not be switched to instead?Related: #4838, #1387.
/cc @igrigorik
The text was updated successfully, but these errors were encountered: