The Code
This user script will run on Yahoo! search results pages. It works by finding the first search result on the page and retrieving it. You might think that it would be easier to add a <link rel="prefetch"> to the page, which is how Google's prefetching works. Unfortunately, this does not work, because by the time the user script executes, Firefox has already prefetched all the links it's going to fetch for the page.
Save the following user script as yahooprefetch.user.js:
// ==UserScript==
// @name Yahoo! Prefetcher
// @namespace http://diveintomark.org/projects/greasemonkey/
// @description prefetch first link on Yahoo! web search results
// @include http://search.yahoo.com/search*
// ==/UserScript==
var elmFirstResult = document.evaluate("//a[@class='yschttl']", document,
null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
if (!elmFirstResult) return;
var urlFirstResult = unescape(elmFirstResult.href.replace(/^.*\*-/, ''));
var oRequest = {
method: 'GET',
url: urlFirstResult,
headers: {'X-Moz': 'prefetch',
'Referer': document.location.href}};
GM_log('prefetching ' + urlFirstResult);
GM_xmlhttpRequest(oRequest);