Open ryanramage opened 11 years ago
Nice — been thinking maybe a _local doc (assuming those can be _show
n) keyed to the PouchDB database .id() could allow the client to determine which tile sets it wants.
The main drawback I'm struggling with is the atomic nature of appcache combined with only being able to have one manifest in use per document — it's kind of a drag to redownload a bazillion existing tiles just because the app.js changed a bit or a new area was added. Need to experiment with better (normal HTTP) cache settings though to see if it helps, unless you know of any other tricks to get the equivalent of multiple manifests in use (iframes?).
Since your app is being served from a couchapp, you can potentially take advantage of a list function to generate the app cache. I have done so in the 'dashboard' for garden apps:
https://github.com/garden20/dashboard/blob/master/lib/lists.js#L232 and https://github.com/garden20/dashboard/blob/master/templates/dashboard.appcache
I simply use the rev of all the docs to signal the change to the browser. I suspect the caching tiles will be slightly different due to the number of them, and how you grab them from a different service.
That being said, I wonder if you can specify a full url for an appcache...
Also, it might be cool if you could do something like:
Anyway, this issue is more of a brain dump.