title: How to set up offline manifest for a web app to run in Safari in iOS?
body: <p>I'm currently trying to set up an offline.manifest file for my web app to be used offline on an iOS device. For testing purposes I have a very simple HTML page that I'm trying to add to a home screen. I'm testing it on a live iPhone 4, but after the page is added to the home screen and I put the iPhone in the airplane mode and try to start my web app I get this error:</p>
  
  <blockquote>
    <p>"Turn Off Airplane Mode or Use Wi-Fi to Access Data"</p>
  </blockquote>
  
  <p>and then if I click OK I get:</p>
  
  <blockquote>
    <p>"Cannot Open Web App Name" "Web App Name could not be opened because
    it is not connected to the Internet"</p>
  </blockquote>
  
  <p>The following is added to the HTML file:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en" manifest="scrts/offline.manifest"&gt;
  </code></pre>
  
  <p>and the offline.manifest is composed as such:</p>
  
  <pre><code>CACHE MANIFEST
  
  ../pics/bkgnd_iphn_settings.png
  ../pics/mbl_btn_fb.png
  ../pics/mbl_btn_twt.png
  ../pics/icon_57_57_bg.png
  ../pics/icon_72_72_bg.png
  ../pics/icon_114_114_bg.png
  ../pics/icon_144_144_bg.png
  ../pics/splash_320_460_bg.png
  ../pics/splash_768_1004_bg.png
  ../pics/splash_1004_768_bg.png
  </code></pre>
  
  <p>I got all instructions on composing it from <a href="http://developer.apple.com/library/safari/#documentation/iPhone/Conceptual/SafariJSDatabaseGuide/OfflineApplicationCache/OfflineApplicationCache.html" rel="nofollow">here</a></p>
  
  <p>I also adjusted the .htaccess file to add this line:</p>
  
  <pre><code>AddType text/cache-manifest .manifest
  </code></pre>
  
  <p>Any idea what am I not doing right?</p>