Web App Refresh


#1

When does an App refresh from the server? After creating a new release, sometimes my phone seems to do it immediately, other times it might be a day later (I’m not using Volt). Is there a setting on an iPhone to force immediate updates (ie. every time an App is run)? I have two iPhones - many times one will run the latest release and the other will keep running the old release for a day.


#2

The mechanism is built into Safari and Chrome - we have no direct control of it.

When the app is started, the browser compares its cached version of the manifest with one it downloads from the server. If they are different, a refresh is triggered. To make sure they are different, we write a time stamp as a comment in the last line of the manifest. (Usually named OfflineApp.appcache).

If the app is unable to get the manifest from the server, no update is performed.


#3

For some reason and out of the blue, when I update my app on my website, I need to clear the cache of my browser now or the app does not update on the iPhone. Prior to this, once I would update my app, the refresh would be automatic. I cannot see anything that would cause this but I just started getting a warning when I open the Project Properties that states, “16:53:09: iCCP: known incorrect sRGB profile, 16:53:09: iCCP: cHRM chunk does not match sRGB”. Not sure if they are related at all. Anyone have this problem as well and/or knows a fix?


#4

The sRGB error is unrelated - it’s an encoding problem with the file itself. Here’s Stack Overflow on this:

Try deleting the app from the device and clearing the cache. There may be stuff left over which is confusing the caching mechanism. This seems to happen much more frequently on development devices.