“The Dark Side of Prefetching gives powers some browsers find unnatural.“
- Darth Sidious, former Nix admin
A while back, Port80 talked about prefetching in browsers and beyond (
http://www.port80software.com/200ok/archive/2005/04/11/388.aspx and
http://www.port80software.com/200ok/archive/2004/11/18/191.aspx). Now you see that accelerating proxies and all sorts of companies are getting into the prefetch game to improve user load time...
We are big supporters of speeding Web sites (as our readers must well know), but we have to say there is a dark side to prefetching -- wasting requests on pages and objects that are never looked at which could be particularly annoying, especially for IT folks. Now, combine prefetching with a lack of
cache control on your site objects or prefetching devices that grab stuff regardless of cache control, and you have a recipe for disaster.
Fortunately, some prefetchers (notably Firefox) send a header; in Firefox's case, it is X-moz: prefetch (
http://www.mozilla.org/projects/netlib/Link_Prefetching_FAQ.html#As_a_server_admin_can_I_distinguish), which you can look for and then potentially send a 403 to block.
Of course, in other cases prefetchers may not play so nicely -- so be forewarned.