https://www.w3.org/TR/resource-hints/
如果我理解正确,两者都用于启动早期连接以便以后更快地加载资源.
预连接正在做"更多".
除了更好的浏览器支持外,有没有理由在预连接上使用dns-prefetch?我也看到网站在相同的链接标签上使用rel,以便尽可能使用预连接,如果没有,则回退到dns-prefetch.
<head>
<link
rel="dns-prefetch preconnect"
href="https://fonts.gstatic.com"
crossorigin
>
</head>
Run Code Online (Sandbox Code Playgroud)