diff --git a/index.html b/index.html index bf2680c..051d7f5 100644 --- a/index.html +++ b/index.html @@ -42,7 +42,7 @@
-

This specification defines the preconnect, prefetch, and prerender relationships of the HTML Link Element (``). These primitives enable the developer, and the server generating or delivering the resources, to assist the user agent in the decision process of which origins it should connect to, and which resources it should fetch and preprocess to improve page performance.

+

This specification defines the dns-prefetch, preconnect, prefetch, and prerender relationships of the HTML Link Element (``). These primitives enable the developer, and the server generating or delivering the resources, to assist the user agent in the decision process of which origins it should connect to, and which resources it should fetch and preprocess to improve page performance.

@@ -65,17 +65,27 @@

Introduction

Many web applications already leverage a variety of prefetching techniques. This includes, but is not limited to, using `XMLHttpRequest` to fetch and cache assets before they are needed. However, these implementations are application specific, are not interoperable, and do not provide the same level of performance as the browser-provided primitives. Worse, these implementations sometimes conflict with the browser logic and result in delayed or unnecessary resource fetches that degrade overall page performance.

-

This specification defines the preconnect, prefetch, and prerender relationships of the HTML Link Element (``). These primitives enable the developer, and the server generating or delivering the resources, to assist the user agent in the decision process of which origins it should connect to, and which resources it should fetch and preprocess to improve page performance.

+

This specification defines the dns-prefetch, preconnect, prefetch, and prerender relationships of the HTML Link Element (``). These primitives enable the developer, and the server generating or delivering the resources, to assist the user agent in the decision process of which origins it should connect to, and which resources it should fetch and preprocess to improve page performance.

Resource Hints

+
+

DNS Prefetch

+ +

The dns-prefetch relation is used to indicate an origin that will be used to fetch required resources, and that the user agent SHOULD resolve as early as possible.

+ +
+  <link rel="dns-prefetch" href="//example.com">
+      
+
+

Preconnect

@@ -157,6 +167,7 @@

Hint probability ("pr") attribute

In addition to specifying the hint type, the application MAY indicate the expected probability that the specified resource hint will be used.

+  <link rel="dns-prefetch" href="//widget.com" pr="0.75">
   <link rel="preconnect" href="//cdn.example.com" pr="0.42">
   <link rel="prefetch" href="//example.com/next-page.html" pr="0.75">
   <link rel="prerender" href="//example.com/thankyou.html" pr="0.25">
@@ -165,7 +176,7 @@ 

Hint probability ("pr") attribute

The pr attribute is a float value in the [0.0-1.0] range that MAY be used in the following cases:

    -
  • With a preconnect relation to indicate probability of initiating a fetch against the specified origin, either within the current navigation context, or within the next navigation context.
  • +
  • With dns-prefetch and preconnect relations to indicate probability of initiating a fetch against the specified origin, either within the current navigation context, or within the next navigation context.
  • With a speculative fetch relation to indicate probability of using the specified resource within the next navigation context.
@@ -201,12 +212,14 @@

Fetching the resource hint link

The resource hint link's may be specified in the document markup, MAY be provided via the HTTP `Link` header, and MAY be dynamically added to and removed from the document.

+  Link: <https://widget.com>; rel=dns-prefetch
   Link: <https://example.com>; rel=preconnect
   Link: <https://example.com/next-page.html>; rel=prerender;
   Link: <https://example.com/logo-hires.jpg>; rel=prefetch; as=image;
       
+  <link rel="dns-prefetch" href="//widget.com" pr="0.75">
   <link rel="preconnect" href="//cdn.example.com" pr="0.42">
   <link rel="prerender" href="//example.com/next-page.html" pr="0.75">
   <link rel="prefetch" href="//example.com/logo-hires.jpg" as="image">