Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Safari repeatedly asks for offline storage access #6

Open
mikeatlas opened this issue Jun 11, 2015 · 4 comments
Open

Safari repeatedly asks for offline storage access #6

mikeatlas opened this issue Jun 11, 2015 · 4 comments

Comments

@mikeatlas
Copy link
Contributor

While zooming and panning around, Safari repeatedly asks for permission to store offline tiles in pouchdb, even after confirming multiple times.

Is there some Safari-specific offline storage option we can set to only make it happen once (or never?)

Screenshot attached:

Repeat dialog for offline permissions

@mikeatlas
Copy link
Contributor Author

This is Safari Version 8.0.6 (10600.6.3), OS X Yosemite 10.10.3

It actually turns Safari into one of those sort of circa-2002 style infinite confirm-loop things which prevents me from even doing much of anything else in the browser :(

@IvanSanchez
Copy link
Contributor

I think is kinda of a known upstream bug: http://pouchdb.com/errors.html#not_enough_space

You might waht to try replacing line 11

    this._db = new PouchDB('offline-tiles');

with something like

    this._db = new PouchDB('offline-tiles', {size: 20});

This shall need some way of checking when the limit is reached, and possibly exposing that size limit as a layer option.

@mikeatlas
Copy link
Contributor Author

Yeah, started digging into it myself as well.

http://pouchdb.com/2014/10/26/10-things-i-learned-from-reading-and-writing-the-pouchdb-source.html

Let me give those suggestions a shot, I'll report back.

@mikeatlas
Copy link
Contributor Author

Yeah, that seems to work, although the problem crops up pretty quickly with satellite imagery tile layers again.

I suppose browser-specific handling might be necessary. Shame this is too new in HTML5 to have a standard shim/spec to avoid cross-browser handling within this project (or upstream perhaps...).

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

No branches or pull requests

2 participants