views:

28

answers:

1

Hello,

First of all, I'd like to say I'm not using any off-line feature from HTML5.

I have a web-application which runs on the iPhone. When viewing it from safari, everything works quite well.

But when I launch the application from the home screen (to remove the navigation bar), it can be really slow.

I checked the logs in Apache and it appears that Safari does a good work to cache the resources (css / js / images), with Apache answering "304 Not Modified" when needed.

However, when the web app run as a "real" application (navigation bar hidden), those resources doesn't get cached and Apache the content has to be transferred over and over again (response code 200 Ok + content), resulting in a significantly slower page load.

How can I prevent this behavior? Do I need to always run my webapp inside Safari, even when it's launched from the home screen?

Thank you!

A: 

I finally used the HTML off-line storage with a cache.manifest file. This half-solved my problem, because images which are not included in the cache manifest still don't get cached (And I don't know those files in advance, because they are included from a CMS, so this could be anything). Still, that's way better for the loading time.

Savageman