<?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>james young &#187; offline storage</title>
	<atom:link href="http://psyjinx.com/jyoung/tag/offline-storage/feed/" rel="self" type="application/rss+xml" />
	<link>http://psyjinx.com/jyoung</link>
	<description>web application developer</description>
	<lastBuildDate>Fri, 05 Mar 2010 18:55:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Example of an offline web app</title>
		<link>http://psyjinx.com/jyoung/2009/12/example-of-an-offline-web-app/</link>
		<comments>http://psyjinx.com/jyoung/2009/12/example-of-an-offline-web-app/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 16:54:25 +0000</pubDate>
		<dc:creator>James Young</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[code example]]></category>
		<category><![CDATA[manifest]]></category>
		<category><![CDATA[offline storage]]></category>

		<guid isPermaLink="false">http://psyjinx.com/jyoung/?p=204</guid>
		<description><![CDATA[<p>The app: http://psyjinx.com/iphone/</p>
<p>This is a very simple webapp.  It displays images that iPhones and iPod Touches can use as wallpaper.  There isn&#8217;t really a need for offline use with the iPhone, but the iPod Touch could benefit from it.  It took me about 10 minutes to learn what to do, and implement [...]]]></description>
			<content:encoded><![CDATA[<p>The app: <a href="http://psyjinx.com/iphone/">http://psyjinx.com/iphone/</a></p>
<p>This is a very simple webapp.  It displays images that iPhones and iPod Touches can use as wallpaper.  There isn&#8217;t really a need for offline use with the iPhone, but the iPod Touch could benefit from it.  It took me about 10 minutes to learn what to do, and implement it for full offline use. The key to making a web app work offline is to add a manifest file.</p>
<p><span id="more-204"></span><br />
The manifest file: I named mine page.manifest, but it can be anything.manifest.  The first line must be CACHE MANIFEST</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">CACHE MANIFEST
&nbsp;
<span style="color: #adadad; font-style: italic;"># html</span>
index.html
&nbsp;
<span style="color: #adadad; font-style: italic;"># images</span>
wallpaper1.jpg
wallpaper2.jpg
wallpaper3.jpg 
wallpaper4.jpg
wallpaper6.jpg
wallpaper7.jpg
wallpaper8.jpg
background.png
favicon.ico</pre></div></div>

<p>Add this to your html file:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;html manifest='page.manifest'&gt;</pre></div></div>

<p>The manifest file must be served as text/cache-manifest.  Add this to your apache conf file in the mines section.  My apache  install had a mime.types file</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">text/cache-manifest    manifest</pre></div></div>

<p>Restart apache and you are done</p>
<p>References:</p>
<ul>
<li><a href="http://developer.apple.com/iphone/library/documentation/AppleApplications/Reference/SafariWebContent/Client-SideStorage/Client-SideStorage.html">http://developer.apple.com/iphone/library/documentation/AppleApplications/Reference/SafariWebContent/Client-SideStorage/Client-SideStorage.html</a></li>
<li><a href="http://www.thecssninja.com/javascript/how-to-create-offline-webapps-on-the-iphone">http://www.thecssninja.com/javascript/how-to-create-offline-webapps-on-the-iphone</a></li>
<li><a href="http://www.w3.org/TR/offline-webapps/#offline">http://www.w3.org/TR/offline-webapps/#offline</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://psyjinx.com/jyoung/2009/12/example-of-an-offline-web-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
