Thursday, November 1, 2012

Prefetch a link using html5

If you know, where a user might navigate to from your current page, prefetching the page is a good idea.
This has been made really easy by html5 by using the prefetch attribute.

For eg -

<link rel="prefetch" href="">

Here, the user might be on page 1 of the site and with the help of html5, we can prefetch page 2 before the user even navigates to it making the page load faster.
Smart and simple.