Skip to content
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

Preconnect/dns-prefetch resource hint against web.dev best practices #960

Closed
schlessera opened this issue Nov 30, 2020 · 1 comment · Fixed by #1065
Closed

Preconnect/dns-prefetch resource hint against web.dev best practices #960

schlessera opened this issue Nov 30, 2020 · 1 comment · Fixed by #1065

Comments

@schlessera
Copy link
Collaborator

I think this combined preconnect and dns-prefetch resource hint is not always doing what it is supposed to do depending on the browser:

As far as I can tell, the dns-prefetch is meant to be the fallback in case the preconnect is not supported (as the preconnect would include a DNS resolution). However, the dns-prefetch is mentioned first, which seems odd.

Also, according to web.dev, best practice is to use two separate hints with the dns-prefetch as the second hint serving as a fallback, as using a combined hint will break in Safari:
https://web.dev/preconnect-and-dns-prefetch/#resolve-domain-name-early-with-reldns-prefetch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants