Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dynamic generation of appcache #17

Open
ryanramage opened this issue Dec 30, 2012 · 1 comment
Open

dynamic generation of appcache #17

ryanramage opened this issue Dec 30, 2012 · 1 comment

Comments

@ryanramage
Copy link

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:

<html  manifest="dashboard.appcache?bbox=x1,y1,x2,y2">

Anyway, this issue is more of a brain dump.

@natevw
Copy link
Owner

natevw commented Jan 2, 2013

Nice — been thinking maybe a _local doc (assuming those can be _shown) 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?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants