-
Notifications
You must be signed in to change notification settings - Fork 209
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
Offline caching: Try To fetch latest data first then shift to cached one. #1819
Conversation
@jywarren , @harshkhandeparkar could you please review this |
Sorry but my knowledge about service workers is just shy of -1 😂 |
No problem @harshkhandeparkar 😊. you have a wide spectrum of knowledge though😅. |
Ah, interesting. Is this something we can write a test for as well? Is there a loading indicator shown while trying to fetch? I'm imagining a slow internet connection, or a 502 error, and if there'd be an option to bypass the wait and use the cache? Thank you @vivek-30 this is cool! |
@jywarren i will add a loading animation for this and taking about the test . i have already created it when i solved another problem related to service worker |
hope you remember. btw great to see you after 3 days 😊 |
trying to bypass the wait is something which i feel is a little impractical. may be as the rendering time will be so quick even in slow connection and switching in the timeframe may lead to some unavoidable issues |
still i will see what cool stuff i can generate meanwhile thanks |
@jywarren Did all the requested changes - Screen.Recording.2021-02-25.at.1.34.51.PM.movAlso the loading animation is already present in the sequencer 😅 ,and thing which you want will require some ajax requests but as this is a single page application that kind of loading will not be required at all |
hope you like this 😊 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nicely done. Thank you so much!!!
Fixes #1237.
finally there is no such problem of having cached data every time . Service worker will now look for latest data first and then shift to cached one if request became unsuccessful.