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

wq/app.js breaks if offline storage is disabled #50

Closed
sheppard opened this issue Jul 4, 2015 · 0 comments
Closed

wq/app.js breaks if offline storage is disabled #50

sheppard opened this issue Jul 4, 2015 · 0 comments
Labels
Milestone

Comments

@sheppard
Copy link
Member

sheppard commented Jul 4, 2015

The new localForage-powered wq/store.js, and by extension wq/app.js, will fail if offline storage is disabled or unavailable. This is similar to #37, but the mechanism for handling it will be a bit different. One option would be to find/create a localForage "driver" that stores everything in memory. Another potential workaround would be to do something like this:

localForage.getItem('test').then(function() {
    // Successful, initialize wq/app.js
    app.init(config).then(function() {
        app.jqmInit();
        app.prefetchAll();
    });
}, app.jqmInit); // Failed; initialize "vanilla" jQuery Mobile

This assumes a wq.db-style backend, i.e. that the HTML templates and URL structure were created to render on the server with progressive enhancement in mind.

This is related to #40, except that the error is predictable (easily triggered by disabling cookies on iOS).

@sheppard sheppard added this to the 0.8.1 milestone Aug 19, 2015
@sheppard sheppard added the bug label Aug 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant