Explain the purpose and application of HTTP/2’s link rel=”preconnect” in HTML.

preconnect establishes early connections to external resources (e.g., fonts, scripts) to reduce latency and improve performance, ideal for resources hosted on different domains.

Example:

<link rel="preconnect" href="https://fonts.googleapis.com">