<?xml version="1.0" encoding="UTF-8" ?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
			<title>Tagged with "block"</title>
			<link>http://www.addedbytes.com/feeds/tag-feed/</link>
			<description></description>
			<language>en</language>
			<copyright>Web Development in Brighton - Added Bytes 2006</copyright>
			<ttl>120</ttl>
			<item>
				<title>Block Prefetching</title>
				<link>http://www.addedbytes.com/blog/block-prefetching/</link>
				<description><![CDATA[ <p>Mozilla and Google's prefetching functions are a nice addition to browser technology in many ways. Unsurprisingly, they are not very well thought through.</p> <p>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).</p>

<p>It appears from the FAQ that Google only intends their accelerator to prefetch specific pages, that have been specified with the &lt;link&gt; tag. However, many people are claiming that normal links have been prefetched.</p>

<p>To prevent prefetching of a page is simple: add the following PHP to the page you do not want prefetched:</p>

<pre class="php">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&lt;br&gt;&lt;br&gt;Prefetching not allowed here.';
    die();
}</pre>

<p>This will serve a "forbidden" header to the prefetcher. Normal browsing should be unaffected.</p> <br><br>]]></description>
				<pubDate>Wed, 20 Apr 2005 16:16:00 +0100</pubDate>
				<guid isPermaLink="false">http://www.addedbytes.com/blog/block-prefetching/</guid>
				<dc:creator>Dave Child</dc:creator>
				<a href="/feeds/tag-feed/?tags=block&amp;start=0" class="ditto_tag" rel="tag">block</a>,<a href="/feeds/tag-feed/?tags=google&amp;start=0" class="ditto_tag" rel="tag">google</a>,<a href="/feeds/tag-feed/?tags=mozilla&amp;start=0" class="ditto_tag" rel="tag">mozilla</a>,<a href="/feeds/tag-feed/?tags=php&amp;start=0" class="ditto_tag" rel="tag">php</a>,<a href="/feeds/tag-feed/?tags=prefetching&amp;start=0" class="ditto_tag" rel="tag">prefetching</a>,<a href="/feeds/tag-feed/?tags=reference&amp;start=0" class="ditto_tag" rel="tag">reference</a>,<a href="/feeds/tag-feed/?tags=webdev&amp;start=0" class="ditto_tag" rel="tag">webdev</a>
			</item>
	</channel>
</rss>