How to set up offline manifest for a web app to run in Safari in iOS?

Posted by ahmd1 on Pro Webmasters See other posts from Pro Webmasters or by ahmd1
Published on 2012-06-12T22:55:20Z Indexed on 2012/06/13 4:48 UTC
Read the original article Hit count: 265

Filed under:
|
|

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:

"Turn Off Airplane Mode or Use Wi-Fi to Access Data"

and then if I click OK I get:

"Cannot Open Web App Name" "Web App Name could not be opened because it is not connected to the Internet"

The following is added to the HTML file:

<!DOCTYPE html>
<html lang="en" manifest="scrts/offline.manifest">

and the offline.manifest is composed as such:

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

I got all instructions on composing it from here

I also adjusted the .htaccess file to add this line:

AddType text/cache-manifest .manifest

Any idea what am I not doing right?

© Pro Webmasters or respective owner

Related posts about web-applications

Related posts about safari