Open matteblair opened 7 years ago
Hrm... yeah, the reason that's happening over and over again is because this...
https://github.com/whosonfirst/js-mapzen-whosonfirst/blob/master/src/mapzen.whosonfirst.net.js
...if fetching lots of files and not being smart about not invoking the cache/localforage hooks after they've been denied the first time.
Check for this and disable further cache sets if true...
SQLError {code: 4, message: "there was not enough remaining storage space, or t…reached and the user declined to allow more space", UNKNOWN_ERR: 0, DATABASE_ERR: 1, VERSION_ERR: 2, …}
Encountered on macOS 10.12.6, Safari 10.1.2
To reproduce, navigate to a page in the Spelunker on Safari, following a link such as: https://whosonfirst.mapzen.com/spelunker/brands/420574927/. You must be visiting it for the first time in this browser or have cleared storage preferences for the domain (Safari -> Preferences -> Privacy -> Manage Website Data... -> mapzen.com -> Remove).
You should encounter an alert like this:![screen shot 2017-08-31 at 2 24 33 pm](https://user-images.githubusercontent.com/3371850/29946554-a7e8b704-8e5a-11e7-9783-bb76d291870e.png)
If you click "Don't Allow", the alert is immediately recreated. While the alert is shown, you cannot close tabs, change settings, open a developer console, or quit Safari. The browser is locked until you agree to allow however much local storage the page needs.
I think this alert is only triggered when a page requests more than 5MB of storage, so maybe this is do to a recent change in the local storage usage? Whatever the cause, can we let the page fail in this case rather than locking the whole browser?