coderef

<link rel="prefetch">Limited availability

The rel="prefetch" attribute for the &#x3C;link> HTML element is a hint to the browser that the user is likely to navigate to a resource, so the browser should preemptively fetch and cache the resource.

Not yet supported in all major browsers — check the table and provide a fallback.

Browser support

DesktopChrome
1–7Not supported
8+Supportedsince Dec 2, 2010
Current: 155
Edge
12+Supportedsince Jul 29, 2015
Current: 154
Firefox
1–1.5Not supported
2+Supportedsince Oct 24, 2006
Current: 157
Safari
✕Not supportedup to 27
Current: 27
MobileChrome Android
18+Supportedsince Jun 27, 2012
Current: 155
Firefox Android
4+Supportedsince Mar 29, 2011
Current: 157
Safari iOS
✕Not supportedup to 27
Current: 27

How to use

Not supported in Safari, Safari iOS. Use feature detection below and provide a fallback (or a polyfill) for those browsers.

Example

Full syntax and examples are on MDN: prefetch.

Feature detection

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

Sub-features

Support for each part of the feature (4). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
PerformanceResourceTiming.deliveryType.navigational-prefetch117117✕✕117✕✕
link.rel.prefetch8122✕184✕
http.headers.Sec-Purpose110110115✕110115✕
http.headers.Sec-Purpose.prefetch✕✕115✕✕115✕