2021年5月6日星期四

Is it possible to use preconnect and preload rel attributes together?

Imagine you have a web server that serves up a document and a cdn that serves up all the document's js component chunks:

There is 1 important chunk main.js that has a preload link rel.

Question: Is it possible to have a preconnect and preload rel on 1 link tag?

Today it is:

<link rel="preload" href="https://d3i4yxtzktqr9n.cdn.net/main.js" crossorigin="anonymous" as="script">  

I want to make it:

<link rel="preconnect preload" href="https://d3i4yxtzktqr9n.cdn.net/main.js" crossorigin="anonymous" as="script">  

Waterfall

https://stackoverflow.com/questions/67427911/is-it-possible-to-use-preconnect-and-preload-rel-attributes-together May 07, 2021 at 09:34AM

没有评论:

发表评论