Avoid Prefetching
Avoid Prefetching
Mozilla and Google’s prefetching functions are a nice addition to browser technology in many ways. 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.
To avoid this we can use following code
if ((isset($_SERVER[’HTTP_X_MOZ’])) && ($_SERVER[’HTTP_X_MOZ’] == ‘prefetch’)) {
header(’HTTP/1.0 403 Forbidden’);
echo ‘403: Forbidden
Prefetching not allowed here.’;
die();
}
