Question

Im experimenting with a site using the cache manifest on iPhone. Ive added the following to my .htaccess file to prevent the browser caching the manifest file:

ExpiresActive On
ExpiresDefault "access"

If I change one of my pages and also add a comment to the manifest file I still need to refresh the page more than once to see any changes.

If I add the site to my iPhone desktop, make a change to the site on the server, and then load the site from the shortcut, I need to manually refresh once to see the change.

How is this sort of problem solved with a real site? Say I made a one page site that functioned like a native app but I wanted it to update itself in the background when an internet connection was available, how could I do this? Would I need to ask my users to manually refresh the page? Thanks

Was it helpful?

Solution

Ive done some more reading and i think this is the way its supposed to work. If you open a website from a shortcut (havn't tried it without), if the manifest file has changed then the files are recached but the changes are only shown the next time the page is seen.

It appears you can force a refresh with javascript. http://developer.apple.com/library/safari/#documentation/iPhone/Conceptual/SafariJSDatabaseGuide/OfflineApplicationCache/OfflineApplicationCache.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top