-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
tentative plan for implementing offline support? #5
Comments
Hi @jantech , Yes I do have some thoughts, and one day I will get around to implementing them. All of the above can be achieved with the service worker. At the moment, the service worker will respond with the latest cached page when offline, but it does this without applying any logic. We can add some logic to the SW that takes a POST request and adds it to a queue for later processing. Then when the SW detects that the network is online again, it can send the requests to the server and update the client with delivery status. This is easy to type up my ideas, but I'm aware that in the real world there are many scenarios that need to be covered, and I don't want to implement something half-baked. I will revisit the to dos on this project in time, but at the moment I am too busy with paid projects to invest my time into things like this. More reading: the fetch event can be intercepted whenever the browser makes a new network request. the actual Request object can be cached/queued, and then dealt with when the network status changes. Hope the links help show you my plans. If you feel like contributing any changes, I'm happy to help guide you, but at the moment I can't commit any time to the project. |
Thanks @g105b , for your reply. Looking forward for the To Dos get implemented. will be waiting for the updates. Thanks, |
Would love to talk about ideas on the topic. We also need the offline support and we are trying to come up with a way. |
Hi @jantech and @eren-cantemur - this is something that I'm currently working on. Catching the requests from a form while offline, so it can be sent to the server when back online. Trying to keep it simple and generic so it can be applied to any project. I'm currently working on another project but as soon as I get time I'll finish this idea off. |
Hi,
Do you have plan for implementing below offline support features mentioned?
Thoughts and to dos:
Thanks
The text was updated successfully, but these errors were encountered: