rel-prerender: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
(Initial version using Arvind and Jatinder text)
 
(Arvind change: http://lists.w3.org/Archives/Public/public-web-perf/2013Jul/0033.html)
Line 3: Line 3:
The prerender keyword may be used with a link, a, and area elements. This keyword creates an external resource link.
The prerender keyword may be used with a link, a, and area elements. This keyword creates an external resource link.


The prerender keyword indicates that preemptively fetching and loading the specified resource in a hidden top-level browsing context is likely to be beneficial, as it is highly likely that the user will navigate to this resource. If the user chooses to navigate to this resource, the user agent may [http://www.w3.org/html/wg/drafts/html/master/browsers.html#navigate navigate] the [http://www.w3.org/html/wg/drafts/html/master/browsers.html#browsing-context current browsing context] to the specified resource.
The prerender keyword indicates that preemptively fetching and loading the specified resource in a hidden top-level browsing context is likely to be beneficial, as it is highly likely that the user will navigate to this resource. If the resource is [http://www.w3.org/html/wg/drafts/html/master/browsers.html#navigate navigated] to, the user agent may replace the [http://www.w3.org/html/wg/drafts/html/master/browsers.html#browsing-context current browsing context] with the one it loaded the specified resource in. If the user agent performs such a replacement, it should preserve the replaced browsing context's session history in such a manner that it is indistinguishable from the case where the navigation happens without replacement.
 
If the user chooses to navigate to this resource, the user agent may  the  to the specified resource.


The user agent may discard the browsing context corresponding to the prerendered resource if any of the following is true:
The user agent may discard the browsing context corresponding to the prerendered resource if any of the following is true:

Revision as of 15:08, 30 July 2013

Link type "prerender"

The prerender keyword may be used with a link, a, and area elements. This keyword creates an external resource link.

The prerender keyword indicates that preemptively fetching and loading the specified resource in a hidden top-level browsing context is likely to be beneficial, as it is highly likely that the user will navigate to this resource. If the resource is navigated to, the user agent may replace the current browsing context with the one it loaded the specified resource in. If the user agent performs such a replacement, it should preserve the replaced browsing context's session history in such a manner that it is indistinguishable from the case where the navigation happens without replacement.

If the user chooses to navigate to this resource, the user agent may the to the specified resource.

The user agent may discard the browsing context corresponding to the prerendered resource if any of the following is true:

  • If the resource is not navigated to within a reasonable amount of time.
  • If the user navigates to some other resource from the current browsing context.
  • If the link element is removed from the document.
  • There is no default type for resources given by the prerender keyword.

Example

<link rel="prerender" href="http://www.example.org/survey/question-2">

See also