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

WIP | Adds ember-service-worker and a couple plugins #835

Closed
wants to merge 1 commit into from

Conversation

locks
Copy link
Contributor

@locks locks commented Jun 29, 2017

Currently caches:

  • app assets (index.html, *.js, *.css, images, …)
  • /api/v1 calls
  • /summary

@Turbo87
Copy link
Member

Turbo87 commented Jun 29, 2017

@locks can you describe what the service worked does in this configuration?

@Turbo87
Copy link
Member

Turbo87 commented Jun 30, 2017

It's caching the API calls?

@locks
Copy link
Contributor Author

locks commented Jun 30, 2017

@Turbo87 oui

@Turbo87
Copy link
Member

Turbo87 commented Jun 30, 2017

how? what is the behavior for getting up-to-date data?

@locks
Copy link
Contributor Author

locks commented Jun 30, 2017

@Turbo87 API calls are like any other ajax call, no? It registers the response for a specific URL in cache. Per the documentation, we are now using a fallback strategy, meaning the cache is only served if no connection is detected. If it's not updating while online, we should look into tweaking the strategy.

@Turbo87
Copy link
Member

Turbo87 commented Jun 30, 2017

hmm... I think we probably shouldn't do this until we have some sort of indication that you're currently offline and viewing cached data or something like that

@Turbo87
Copy link
Member

Turbo87 commented Jun 30, 2017

what's the caching strategy for the app assets?

@locks locks changed the title Adds ember-service-worker and a couple plugins WIP | Adds ember-service-worker and a couple plugins Jun 30, 2017
@tchak
Copy link
Contributor

tchak commented Dec 2, 2017

Maybe we can start by adding service worker for assets and index page? It is pretty safe and will give us a nice boost on second visits. Plus some points in Lighthouse score :)

@locks
Copy link
Contributor Author

locks commented Dec 2, 2017

@tchak yeah, that's my idea for when I return to contributing here!

@Turbo87
Copy link
Member

Turbo87 commented Dec 2, 2017

@tchak while I agree that serviceworker support would be good, we should make sure that the error handling in this app is working properly. without serviceworker the page won't load at all if offline, but with serviceworker it will load but won't show any data and timeout at some point.

@Turbo87
Copy link
Member

Turbo87 commented Mar 23, 2018

I guess we should wait until ember-cli/rfcs#117 has landed before moving forward with this

@carols10cents
Copy link
Member

Hi ember folks, I'm cleaning up some PRs... I'm betting this is out of date by now, so I'm going to close it! Please reopen if I'm mistaken! Thank you ❤️

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

Successfully merging this pull request may close these issues.

4 participants