Loading...
<link rel="preconnect" href="https://fonts.example.com">
<link rel="stylesheet" href="https://fonts.example.com/inter.css"><link rel="preconnect" href="https://fonts.example.com" crossorigin>
<link rel="stylesheet" href="https://fonts.example.com/inter.css">Font files are fetched in CORS mode, so the preconnect needs crossorigin to match and be reused.
crossorigin, so the connection is not reused.crossorigin attribute.Only a few critical ones. Each open connection costs resources and is closed if it is not used soon.
dns-prefetch only resolves the domain name, while preconnect also opens the connection, including the TLS handshake.