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

Support caching comment-threads / page content offline #25

Closed
addyosmani opened this issue Apr 25, 2016 · 0 comments · Fixed by #26
Closed

Support caching comment-threads / page content offline #25

addyosmani opened this issue Apr 25, 2016 · 0 comments · Fixed by #26
Assignees

Comments

@addyosmani
Copy link
Collaborator

I previously added support for caching the react-hn application shell and static assets using Service Worker. This gave us a little bit of offline support, but the bigger missing piece here was caching comment threads and general responses coming back from the Firebase API. Let's fix that 🔧

Firebase's default offline support unfortunately only works during an individual session, so as soon as you close a tab or try relaunching the app from say - your Service Worker cache - it's still going to try reaching out to the network. This kills our ability to have comment pages fully work offline.

To address this, I've been working on a minimal read-only caching module that sits on top of Firebase that caches responses coming back from on(), once(), child() and so on using localForage (i.e IndexedDB in most modern browsers). I'll be PR'ing in a change that introduces this shortly.

@addyosmani addyosmani self-assigned this Apr 25, 2016
@NekR NekR closed this as completed in #26 Apr 26, 2016
NekR added a commit that referenced this issue Apr 26, 2016
Adds Firebase API read-through caching (fixes #25)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant