Tech Journal Back to Tech Journal

How can I tell a browser that it's a good idea to pre-fetch a certain link?

Mozilla have thought about this, and suggested a way to encourage a browser to pre-download a page before the user clicks on the link. To do this, you can use:

<link rel="prefetch" href="http://www.craimer.org/~shalom/php/tech-journal.php" />

(Yes, you don't have to use partial URLs. And links can be off-site!)

This is detailed in:
http://developer.mozilla.org/en/docs/Link_prefetching_FAQ

Firefox doesn't actually do this on its own (or at least, I've yet to see it happen), but you can install an extension that does a prefetch much more quickly - Fasterfox.

Note: This isn't a standard, it's at most some kind of RFC. But it's something you can do to encourage a browser to do pre-fetching. Of course, there's other ways to do that, if you know the browser has a cache...

Last updated on 2007-07-16 03:41:17 -0700, by Shalom Craimer

Back to Tech Journal