pre-fetching
December 29th, 2005 by Sonja DuijvesteijnPrefetching is a technique used by Firefox and Mozilla to fetch a page before the link is actually clicked. It uses the idle time of the browser to get the contents you would probably want to see next. How does it work, and why would you want to use it?
How it works is quite simple, by adding a link:
<link rel="prefetch" href="/images/big.jpeg">
By sending out a HTTP Link: header
Link: </images/big.jpeg>; rel=prefetch
Or specify the http link header in the document itself by adding a metatag.
<meta http-equiv="Link" content="</images/big.jpeg>; rel=prefetch">
When the browser finds this header or link tag in the page it will continue to load this page and after it’s finished it will start to load the prefetch contents, by this already placing it in the cache so it’s faster to view the page when you actually want to see it.
Why would you use it?
I’ll explain this with an example. At the moment there is a big overhaul in the health insurance in the Netherlands. All old insurances are changed to a basic insurance. So there are about 10 million people that want find information about these changes. Assume you sell insurances, amongst which health insurance. Most of you visitors will be looking for information about this basic insurance. By already prefetching this page you’ll save your customers waiting time.
Another example is google, when you look for something specific like ‘Connectholland‘ which is the company I work for. Google will in this case assume that you are in fact looking for the company and will add a prefetch link to the page.
Check wether your browser supports prefetching.
Related posts
No related posts.