You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When js are disabled all requests are done directly to the backend server, just like a web page from the 90´s.
If js is present every POST request are run via a client side queue making it possible to handle bad connections or before the web app knows that it is offline.
If the request are not possible to complete the app are going into offline mode. The online js are swapped to an offline version that are less capable. For example it removes the links to the different views All, Active, Completed, the current todo´s in the list are the ones showing in the offline mode. At this point its possible to add, edit and delete the present todo´s. Every action are stored in the queue and are sent to the server then the app goes online.
Offline GET requests are handled in js, like the edit link click on a todo.
In the offline js code there are offline templates that are used to render the todos.
What you see is what you get. In other word there are no client side state used to render the page. The only state used are the queue used to store the actions made in the page.
Todo
Add a service worker to handle reload when in offline mode. The service worker needs to be updated on each change in offline mode to be able to not loose the current page state.
The text was updated successfully, but these errors were encountered:
Are offline mode possible in ROCA?
I have played with a offline example at https://offline-capable-todomvc.herokuapp.com/.
How it works
All, Active, Completed
, the current todo´s in the list are the ones showing in the offline mode. At this point its possible to add, edit and delete the present todo´s. Every action are stored in the queue and are sent to the server then the app goes online.Todo
The text was updated successfully, but these errors were encountered: