Mozilla and Google's prefetching functions are a nice addition to browser technology in many ways. Unsurprisingly, they are not very well thought through. The main two problems with the prefetching idea are that it messes with log files and it means every link on a page could potentially be followed despite the consequences (dangerous in a site administration context).
It appears from the FAQ that Google only intends their accelerator to prefetch specific pages, that have been specified with the <link> tag. However, many people are claiming that normal links have been prefetched.
To prevent prefetching of a page is simple: add the following PHP to the page you do not want prefetched:
if ((isset($_SERVER['HTTP_X_MOZ'])) && ($_SERVER['HTTP_X_MOZ'] == 'prefetch')) {
// This is a prefetch request. Block it.
header('HTTP/1.0 403 Forbidden');
echo '403: Forbidden<br><br>Prefetching not allowed here.';
die();
}
This will serve a "forbidden" header to the prefetcher. Normal browsing should be unaffected.

3 Comments
Products like Basecamp that use GET requests with intermediary Javascript confirm() calls for potentially dangerous actions such as deleting an item are suffering the most from prefetching.
I have to wonder why Javascript is used in favor of an intermediary confirmation screen that requires a POST request to complete the delete action?
Off the top of my head I can think of one big one: intercepting a GET request with Javascript saves the user (and the server) an additional page load.
XMLHttpRequest is perhaps an option, but is it yet viable?
#1, Brett, United States, 9 May 2005. Reply to this.
I just had a look at http://www.mozilla.org/projects/netlib/Link_Prefetching_FAQ.html
Prefetching should only take place in link-tags with rel="prefetch". So if you really can reproduce a situation where if simply fetches all links file a bug at http://bugzilla.mozilla.org, here the responsible developers won't read it.
PS: really great comment preview, I start loving "Web 2.0" applications. :-)
#2, Sven Krohlas, Germany, 21 February 2006. Reply to this.
nice tip. thx
ps: some css rules for these inputs would make this site also look good on systems using unsuitable themes. i think, black text on white bg would do it already :)
#3, Nemesis#13, Unknown, 24 November 2007. Reply to this.