Its possible to force an update:

Spec:
http://www.w3.org/TR/html5/offline.html
Pretty good example:
http://developer.apple.com/safari/library/documentation/iPhone/Conceptual/SafariJSDatabaseGuide/OfflineApplicationCache/OfflineApplicationCache.html

Cheers
Max

On Mon, Mar 1, 2010 at 09:16, Alex Zylka <[email protected]> wrote:

> You were correct on assuming that even with a connection, the device will
> use cached files. The only issue with this is that after caching a webapp,
> you might not be able to update it with a connection. I have not gotten that
> to work in any of my apps yet.
>
>
> On Feb 28, 2010, at 10:27 PM, Victor Hudson <[email protected]> wrote:
>
>  Very nice. I do have a question that you or someone else here may be
>> able to answer. When using a cache manifest and the user visits the
>> site while they are online does the browser use the cached files or
>> does it ignore manifested files and download based on src. What I am
>> thinking is this could be used to give better web app performance over
>> cell networks. If the browser uses cached files even when on line then
>> you could manifest things like the iui frame work, all css, js, and
>> images along with the initial index page. Then let Ajax load the rest
>> as needed. The only data that would need to be transferred would be
>> HTML fragments and you have greatly reduced load times for the user.
>> Any thoughts or comments.
>>
>> Vic Hudson
>> Phone: (859) 806-1773
>> Personal: [email protected]
>> School: [email protected]
>> Work: [email protected]
>>
>> On Feb 28, 2010, at 19:53, Alex Zylka <[email protected]> wrote:
>>
>>  Ok, so I said that I would create some sort of offline webapp tutorial
>>> thing. So here goes:
>>>
>>> There is one important thing that you need for this simple, easy to
>>> use solution. It's PHP. If you don't have it, you'll have to list all
>>> of the files you want to cache manually.
>>>
>>> Step 1. Create a PHP file called manifest.php
>>> Step 2. Put the following into it:
>>>
>>> <?php
>>> header('Content-Type: text/cache-manifest');
>>> echo "CACHE MANIFEST\n";
>>>
>>> $hashes = "";
>>>
>>> $dir = new RecursiveDirectoryIterator(".");
>>> foreach(new RecursiveIteratorIterator($dir) as $file) {
>>>  if ($file->IsFile() &&
>>>      $file != "./manifest.php" &&
>>>      substr($file->getFilename(), 0, 1) != ".")
>>>  {
>>>    echo $file . "\n";
>>>    $hashes .= md5_file($file);
>>>  }
>>> }
>>> echo "# Hash: " . md5($hashes) . "\n";
>>> ?>
>>>
>>> Step 3. Put manifest.php in the directory of the webapp that you want
>>> to use offline
>>> Step 4. Replace your <html> tag with <html manifest="manifest.php"> in
>>> the index.html, index.php, etc. file
>>>
>>> Note: That md5 hash is necessary so that every time you add a new
>>> file, or edit one, the hash changes, forcing the device that is using
>>> the webapp offline to re-cache, and update its offline files.
>>>
>>> Alex
>>>
>>> P.S. A more in-depth tutorial, that manually list files, with an
>>> example can be found here:
>>> http://www.thecssninja.com/javascript/how-to-create-offline-webapps-on-the-iphone
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "iPhoneWebDev" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected]<iphonewebdev%[email protected]>
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/iphonewebdev?hl=en
>>> .
>>>
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "iPhoneWebDev" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<iphonewebdev%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/iphonewebdev?hl=en.
>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "iPhoneWebDev" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<iphonewebdev%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/iphonewebdev?hl=en.
>
>


-- 
Max

-- 
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en.

Reply via email to