Closed bhubbard closed 4 years ago
We could conditionally add it now or wait until 4.6 is the minimum version (we support WP stable and the major version previous).
I think doing a conditionally right now makes sense, this way all the prefetch load together on the page, and it will prevent duplication.
Looking closer, we can be smarter about it too. Right now, for example, prefetching jetpack.wordpress.com
is only really helpful when a site is using Jetpack Comments. We can use the filter to only add that when Comments are enabled, public-api only when Likes are enabled, the Photon CDN only when Tiled Galleries or Photon is enabled, etc.
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.
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.
Now that 4.6 offers resources hints, Jetpack DNS Prefetch should be updated to use it. Maybe the code can be removed completely as WordPress will now auto prefetch any registered scripts/styles.
https://make.wordpress.org/core/2016/07/06/resource-hints-in-4-6/