Loading...
<link rel="dns-prefetch" href="/api">
<link rel="dns-prefetch" href="/images"><link rel="preconnect" href="https://cdn.example.com">
<link rel="dns-prefetch" href="https://cdn.example.com">Hints point to another origin, and pairing dns-prefetch with preconnect gives a cheap fallback.
dns-prefetch for the page's own domain, which is already resolved.href is an origin of another domain, not the site's own domain.rel='preconnect'.No, the current domain is already resolved when the page loads, so the hint has no effect.
Yes, as a fallback and for origins the page might use later, where opening a full connection would be wasteful.