On 9/20/07, <b class="gmail_sendername">Maciej Stachowiak</b> <<a href="mailto:mjs@apple.com">mjs@apple.com</a>> wrote:<div><span class="gmail_quote"></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2) Many offline web apps will let you want to make changes, including<br>not just changing existing items, but also creating new items. To do<br>this, at minimum there needs to be an API to inject a new resource<br>into the offline cache programatically, with the data explicitly
<br>provided.</blockquote><div><br>This violates the principle that the offline cache is a cache. It creates the issue of how to reconcile server pages with client-stored pages.<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
6) It's potentially costly to download data mulltiple times, so if you<br>pull the remote data into a local database, you won't also want to<br>pull every page reflecting that data, instead you will want to<br>generate templates client-side and insert them into the offline cache.
<br>However, it seems like a relatively small step from there to having a<br>single fallback page to be used for all URIs that are part of the app<br>but haven't gotten downloaded in the course of normal use. And this
<br>would be a huge optimization, since it would save the client the need<br>to manually generate each page for a resource of interest that has not<br>yet been visited.<br><br>Given point #1, I think this should be based on textual prefix
<br>matching of the URI, not just dropping the query (the scheme and<br>authority sections should be treated specially, of course, it should<br>not be allowed to have a fallback page in someone else's security<br>domain). This will allow matching paths and also matching only
<br>specific kinds of queries (where the first parameter is set to some<br>specific value, say). However, to make offline and online mode diverge<br>as little as possible, I think perhaps such fallback pages should<br>apply only when offline. When online, the UA should go to the real
<br>page. With the prefix-based fallback page solution, I'm not sure it<br>will be necessary to also support individual client-generated pages.</blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thoughts?</blockquote><div><br>It sounds reasonable to me, a lot better than option 2).<br></div></div><br clear="all">Rob<br>-- <br>"Two men owed money to a certain moneylender. One owed him five hundred denarii, and the other fifty. Neither of them had the money to pay him back, so he canceled the debts of both. Now which of them will love him more?" Simon replied, "I suppose the one who had the bigger debt canceled." "You have judged correctly," Jesus said. [Luke 7:41-43]