<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Libre Things &#187; Chromium</title>
	<atom:link href="http://positon.org/tag/chromium/feed" rel="self" type="application/rss+xml" />
	<link>http://positon.org</link>
	<description></description>
	<lastBuildDate>Tue, 23 Feb 2016 20:01:11 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.7.1</generator>
	<item>
		<title>Preload web content using link prefetch or javascript</title>
		<link>http://positon.org/preload-web-content-using-link-prefetch-or-javascript</link>
		<comments>http://positon.org/preload-web-content-using-link-prefetch-or-javascript#comments</comments>
		<pubDate>Sat, 30 Oct 2010 15:50:00 +0000</pubDate>
		<dc:creator><![CDATA[dooblem]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Bizou]]></category>
		<category><![CDATA[Chromium]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://positon.org:81/?p=104</guid>
		<description><![CDATA[For the Bizou php gallery, I looked for different ways of preloading next image in &#8220;view&#8221; mode (example). With Firefox it&#8217;s very simple. Just use the following element and the browser will preload your contents. Contents are preloaded in background, once the whole current page is loaded. [html] &#60;link rel=&#34;prefetch&#34; href=&#34;/images/nextimage.jpg&#34; /&#62; Problem: only Firefox [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>For the <a href="http://www.positon.org/bizou/en.html">Bizou</a> php gallery, I looked for different ways of preloading next image in &#8220;view&#8221; mode (<a href="http://www.positon.org/images/view.php/2008%20Corse/001%20ajaccio.jpg">example</a>).</p>
<p>With <a href="http://www.mozilla.com/firefox/">Firefox</a> it&#8217;s very simple. Just use the following element and the browser will preload your contents.<br />
Contents are preloaded in background, once the whole current page is loaded.</p>
<pre> [html]
&lt;link rel=&quot;prefetch&quot; href=&quot;/images/nextimage.jpg&quot; /&gt;
</pre>
<p>Problem: only Firefox supports this currently.<br />
Note: a <a href="http://code.google.com/p/chromium/issues/detail?id=52878">ticket is opened</a> about this in the <a href="http://www.chromium.org/Home">Chromium</a> project.</p>
<p>For other browsers, use some Javascript triggered by the <code>window.onload</code> event:</p>
<pre> [javascript]
&lt;script type=&quot;text/javascript&quot;&gt;
window.onload = function() {
    // for images
    var im = new Image();
    im.src = '/images/nextimage.jpg';
    // and for other content
    var req = new XMLHttpRequest();
    req.open('GET', 'nextpage.php', false);
    req.send(null);
};
&lt;/script&gt;
</pre>
<p>Beware of HTTP cache headers sent by the server to the browser.<br />
To preload correctly PHP pages, make your script send an Expires header:</p>
<pre>
header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + 3600));
</pre>
<p>Then, for a simple browser detection from your PHP script:</p>
<pre>
&lt;?php if (strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== false) { ?&gt;
&lt;link rel=&quot;prefetch&quot; href=&quot;nextpage.php&quot; /&gt;

&lt;?php } else { ?&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
window.onload = function() {
    var req = new XMLHttpRequest();
    req.open('GET', 'nextpage.php', false);
    req.send(null);
};
&lt;/script&gt;
&lt;?php } ?&gt;
</pre>
<p><ins>Links</ins> :</p>
<ul>
<li><a href="https://developer.mozilla.org/en/Link_prefetching_FAQ" title="https://developer.mozilla.org/en/Link_prefetching_FAQ">https://developer.mozilla.org/en/Link_prefetching_FAQ</a></li>
<li><a href="http://www.4thkingdom.com/wp-content/uploads/dotclearold/computers/789073-web-site-speed-prefetching-images-css/view-post.html" title="http://www.4thkingdom.com/wp-content/uploads/dotclearold/computers/789073-web-site-speed-prefetching-images-css/view-post.html">http://www.4thkingdom.com/wp-content/uploads/dotclearold/computers/789073-web-site-speed-prefetching-images-css/view-post.html</a> (using jQuery)</li>
<li><a href="http://orip.org/2009/03/prefetching-javascript-or-anything-with.html" title="http://orip.org/2009/03/prefetching-javascript-or-anything-with.html">http://orip.org/2009/03/prefetching-javascript-or-anything-with.html</a> (using jQuery)</li>
<li><a href="http://www.positon.org/git/?p=bizou.git;a=commitdiff;h=3287102a856be64262a9db0c98e7be7f9c26dbb8">commit sur Bizou</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://positon.org/preload-web-content-using-link-prefetch-or-javascript/feed</wfw:commentRss>
		<slash:comments></slash:comments>
		</item>
	</channel>
</rss>
