Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Using a cache manifest and lot of troubleshooting, I am able to reliably cache an entire application; Do note that this is a single page app with only a few separate file resources.</p> <p>As a further enhancement, I have been trying to modify the DOM based on</p> <blockquote> <p>window.applicationCache status</p> </blockquote> <p>to inform the user about updates, ie:</p> <blockquote> <p>tap here to apply update</p> </blockquote> <p>If that were possible, I could swap the cache</p> <blockquote> <p>window.applicationCache.swapCache();</p> </blockquote> <p>Which would allow me to swap in the updated cache and then restart the page to provide a streamlined update mechanism.</p> <p>Potentially even more streamlined than apps from the apple store.</p> <p>I suspect that the applicationCache API was hamstrung by Apple to hinder web apps for this very reason. Having said that, I believe the level of support for "html5" APIs on mobile devices is among the most robust in apple's safari.</p> <p>Following are a few problems I have noticed so far, in no particular order. Please note that this is not a comprehensive list of bugs.</p> <p>I never get an 'updateready' event; this alert line never runs:</p> <pre><code>window.applicationCache.addEventListener('updateready', function(e) { alert('updateready event status=' + window.applicationCache.status ); }, false); </code></pre> <p>I can not manually check for updates. The following code gives me an exception</p> <pre><code> try{ window.applicationCache.update(); }catch (err){ alert('exception:\n' + err); } </code></pre> <p>It seems that as soon as I start to interact with the cache state at all, the caching stops working. The bugs are fiendishly elusive; pinning down &amp; isolating any one issue can take a lot of time, especially since all this code runs flawlessly on other browsers (chrome).</p> <p>Now here's a good one: I suspect that if you pin an app to your home screen, iCloud "backs up" resources and restores them after you run the app for the first time from the home screen. To avoid this issue, you may sometimes have to rename files. I have proven that apple makes discrete backups of obsolete components by</p> <p>removing them entirely from my app server</p> <p>deleting the pinned web apps from home screen</p> <p>clearing all the caches</p> <p>opening the app url in safari</p> <p>verify that its the newest version</p> <p>pin to home</p> <p>verify that the pinned app the newest version</p> <p>close it</p> <p>run again - and its back to the old one, no longer on your server.</p> <p>Finally, if you run the pinned app while the phone is in airplane mode, iCloud will not be able to restore the obsolete files. This proves that it's coming from over the air.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload