[Hummingbird] Suggested improvements for "Prefetch DNS Requests"

1) Inaccurate wording

It says "prefetch" but I looked at the code and it's actually "dns-prefetch"

These are 2 different things:

https://w3c.github.io/resource-hints/#dfn-dns-prefetch vs https://w3c.github.io/resource-hints/#dfn-prefetch

2) Too many defaults?

There are a lot of suggested defaults and it's easy for an uneducated user to decide to just add them all… but it's counterproductive if not using assets from those domains, such as not using Google Fonts and others.

3) Add 'preconnect'

Use https://w3c.github.io/resource-hints/#dfn-preconnect in addition to dns-prefetch for better performance. Don't forget to add crossorigin="anonymous" when using the 'wp_resource_hints' filter.

https://www.machmetrics.com/speed-blog/guide-to-browser-hints-preload-preconnect-prefetch/ is a helpful reference.

  • Adam Czajczyk
    • Support Gorilla

    Hello Clifford P,

    I hope you’re well today and thank you for your suggestions!

    1) Inaccurate wording

    It says “prefetch” but I looked at the code and it’s actually “dns-prefetch”

    These are 2 different things:

    https://w3c.github.io/resource-hints/#dfn-dns-prefetch vs https://w3c.github.io/resource-hints/#dfn-prefetch

    I’m not sure if I’m getting this correctly. There is a difference but the Hummingbird on Hummingbird Pro -> Advanced Tools -> General page says “Prefetch DNS requests”, not just “Prefetch” which, I think, clearly states that it’s “dns-prefetch”. I might be missing something or understanding that wrong so I’d appreciate some additional explanation. I’m asking because before I forward it to Hummingbird dev team I just want to make sure that we are on the same side and I get your point right :slight_smile:

    3) Add ‘preconnect’

    Use https://w3c.github.io/resource-hints/#dfn-preconnect in addition to dns-prefetch for better performance. Don’t forget to add crossorigin=”anonymous” when using the ‘wp_resource_hints’ filter.

    That sounds like a good idea :slight_smile: I’ll suggest that to our developers then!

    2) Too many defaults?

    There are a lot of suggested defaults and it’s easy for an uneducated user to decide to just add them all… but it’s counterproductive if not using assets from those domains, such as not using Google Fonts and others.

    I can see your point on this. On the other hand, those “pre-defined” values are very common as most of the themes are using Google Fonts, most of the sites are using Google Analytics, Gravatars are poart of WordPress core and YouTube is extremely popular too. I agree that not all of them are used on all the sites but the goal here was simplicity to provide user with as little setup as possible and that seemed like a reasonable compromise. But there’s always room for improvements :slight_smile: Do you have any suggestions how we could make this better? Some automatic detection maybe or some sort of check-box selection with additional explanation? I’d appreciate any ideas :slight_smile:

    Best regards,

    Adam