Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.59k stars 800 forks source link

Update Jetpack DNS Prefetch to use 4.6 Resource Hints #4838

Closed bhubbard closed 4 years ago

bhubbard commented 8 years ago

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/

kraftbj commented 8 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).

bhubbard commented 8 years ago

I think doing a conditionally right now makes sense, this way all the prefetch load together on the page, and it will prevent duplication.

kraftbj commented 8 years ago

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.

stale[bot] commented 6 years ago

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.

stale[bot] commented 5 years ago

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.