dns-prefetch为了提高页面加载时间,我想使用preconnect外部 javascripts。
<link rel="dns-prefetch" href="https://example.com">
<link rel="preconnect" href="https://example.com">
如果资源(在我的情况下是外部 javascript)已经在浏览器缓存中会发生什么?是否不必要dns-prefetch地preconnect添加页面加载时间?换句话说:是否dns-prefetch并且preconnect仅在第一页加载时有用?