coderef

<link rel="preconnect">Baseline · Widely available

The rel="preconnect" attribute for the &#x3C;link> HTML element is a hint to the browser that the page or user is likely to request resources from another origin, so the browser should preemptively start a connection to the href value's origin.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Jan 15, 2020. Widely available since Jul 15, 2022.

Browser support

DesktopChrome
1–45Not supported
46+Supportedsince Oct 13, 2015
Current: 155
Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154
Firefox
1–38Not supported
39+Supportedsince Jul 2, 2015
Current: 157
Safari
1–11Not supported
11.1+Supportedsince Apr 12, 2018
Current: 27
MobileChrome Android
18–45Not supported
46+Supportedsince Oct 14, 2015
Current: 155
Firefox Android
4–38Not supported
39+Supportedsince Jul 2, 2015
Current: 157
Safari iOS
1–11Not supported
11.3+Supportedsince Mar 29, 2018
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

Full syntax and examples are on MDN: preconnect.

Feature detection

JS · check before using
if ("rel" in document.createElement("link")) {
  // the rel attribute/property of <link> is supported
}