Auto save on closing page and removed save button#2
Conversation
There was a problem hiding this comment.
Hi Amanse! Thanks for your contribution. I think you are right there should be auto save although your code has some problems:
- Whene I press the arrow (on the top left corner) or I click the back button on the smartphone, the app closes itself automatically instead of going back to the home
- Please don't change the style or the syntax of the instructions, I don't know if it was you or a plugin you use on your code editor
Thanks again for your contribution 💪
- Massimo Moffa
|
I was planning to make a single change but unfortunately my browser cached the page so even if i shutdown the local server it would still show, so i kept making changes and maybe screwed a few things on the way... Sorry about that... And prettier did the other |
|
This type of app is called PWA (Progressive Web App) and the core is the Service Worker which is a particular js file which contains various directives such as the files to cache. In order to avoid this type of problems while working on this project you have to disable the service worker or at least you have to unregister his scope |
|
That's very helpful, thanks a lot! |
Fixes #1
Auto saves entry on saving instead of having to hit the save button. Save button is also removed as there were double entries. Now to save just close the tab or press back as people are habitual on android for that especially when when we use add to homescreen to use it as an app.