blob: 0fb970059f5f43d5cece649257d0e554f4283c54 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
 | <header><h1>rel=dns-prefetch</h1></header><div class="section-content">
<p>The <code>dns-prefetch</code> keyword for the <a href="../../element/link#rel"><code>rel</code></a> attribute of the <a href="../../element/link"><code><link></code></a> element is a hint to browsers that the user is likely to need resources from the target resource's origin, and therefore the browser can likely improve the user experience by preemptively performing DNS resolution for that origin.</p> <p>See <a href="https://developer.mozilla.org/en-US/docs/Web/Performance/dns-prefetch">Using dns-prefetch</a> for more details.</p>
</div>
<h2 id="specifications">Specifications</h2>
<div class="_table"><table class="standard-table">
<thead><tr><th scope="col">Specification</th></tr></thead>
<tbody><tr><td><a href="https://html.spec.whatwg.org/multipage/links.html#link-type-dns-prefetch">HTML Standard <br><small># link-type-dns-prefetch</small></a></td></tr></tbody>
</table></div>
<h2 id="browser_compatibility">Browser compatibility</h2>
<div class="_table"><table>
<thead>
<tr id="bct-browser-type">
<th></th>
<th colspan="6">Desktop</th>
<th colspan="6">Mobile</th>
</tr>
<tr id="bct-browsers">
<th></th>
<th>Chrome</th>
<th>Edge</th>
<th>Firefox</th>
<th>Internet Explorer</th>
<th>Opera</th>
<th>Safari</th>
<th>WebView Android</th>
<th>Chrome Android</th>
<th>Firefox for Android</th>
<th>Opera Android</th>
<th>Safari on IOS</th>
<th>Samsung Internet</th>
</tr>
</thead>
<tbody><tr>
<th><code>dns-prefetch</code></th>
<td class="bc-supports-yes">46</td>
<td class="bc-supports-yes">≤79</td>
<td class="bc-supports-yes">3</td>
<td class="bc-supports-no">No</td>
<td class="bc-supports-yes">33</td>
<td class="bc-supports-no">No</td>
<td class="bc-supports-yes">46</td>
<td class="bc-supports-yes">Yes</td>
<td class="bc-supports-yes">4</td>
<td class="bc-supports-no">No</td>
<td class="bc-supports-no">No</td>
<td class="bc-supports-yes">Yes</td>
</tr></tbody>
</table></div>
<h2 id="see_also">See also</h2>
<div class="section-content"><ul> <li>
<a href="https://developer.mozilla.org/en-US/docs/Web/Performance/Speculative_loading">Speculative loading</a> for a comparison of <code><link rel="dns-prefetch"></code> and other similar performance improvement features.</li> </ul></div><div class="_attribution">
  <p class="_attribution-p">
    © 2005–2023 MDN contributors.<br>Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.<br>
    <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/dns-prefetch" class="_attribution-link">https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/dns-prefetch</a>
  </p>
</div>
 |