I have following assets:
<link rel="preload" as="script" href="my.js"><script type="text/javascript" src="my.js" async defer><link rel="dns-prefetch" href="//my.cdn.com"><link rel="preconnect" href="//consentscript.tld"><script type="text/javascript" src="https://remote.server/my.js" async defer><script>myFunc...;</script><style>body{color:black;}</style>Empirically, I realized that the order of these assets, as they are listed in the HTML head, influences the loading speed of the page and the Core Web Vitals metrics.
Could somebody point me to the performance-optimized order of asset placement in the HTML head? A link to documentation would help me too.
Check out Get your head straight by Harry Roberts, summarized in this Smashing Magazine post and CSS Tricks article for guidance and tools to help you optimize the <head> contents.