link rel="prefetch" - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:link


Preemptively Fetching a Resource

You can ask the browser to preemptively fetch a resource.

The following code shows the use of the link element to specify prefetching.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
      <link rel="prefetch" href="/page2.html"> 
          I like 
         <code id="myId">HTML</code>
          and CSS. <!--from ww w. j ava2 s  .co m-->
      <a href="">Visit</a> 
      <a href="page2.html">Page 2</a>  

Related Tutorials