How HTML 5 link prefetching can make your site load faster with one line of code. « keyboardy
ably decrease load times for a significant chunk of your users just by adding one line of code to your HTML. Pretty cool, huh?
One of the lesser-known jewels of HTML 5 is link prefetching. The idea is to extend the time-honored concept of image preloading to HTML content (and without any messy AJAX code). Here’s how it works: You add a line like this to your page: <link rel="next" href="page2.html"> Then the browser automatically downloads page2.html in a background process as soon as the user’s computer is idle. When the user finally clicks a link to page2.html, the browser serves it from the cache, and so it loads significantly faster. Link prefetching is currently only supported by Firefox. But since Firefox is the second most popular web browser in the world, you can noticeably decrease load times for a significant chunk of your users just by adding one line of code to your HTML. Pretty cool, huh?