iPhone webapp: my ressources don't get cached

Posted by Savageman on Stack Overflow See other posts from Stack Overflow or by Savageman
Published on 2010-05-20T12:47:52Z Indexed on 2010/05/20 12:50 UTC
Read the original article Hit count: 241

Filed under:
|
|
|

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!

© Stack Overflow or respective owner

Related posts about iphone

Related posts about webapp