Reputation: 199
I am developing a web app using angular and springboot.
I want to know if it is possible to save data in a temporary file that will be saved on the client pc and that when I recover my connection the data is automatically updated on the server. ?
Upvotes: 1
Views: 96
Reputation: 9986
In my back-end web development course, we discussed cases where LocalStorage would be superior to cookies. An example of a good use of LocalStorage might be in an application used in regions without a persistent internet connection. I past and used LocalStorage to protect and store data collected in areas with spotty WiFi or data connections.
In order for this to be a good use of LocalStorage, the threat level of the data stored in this situation would have to be very low. To protect client privacy, it would be good to upload the data when connection is re-established and then delete the locally stored version. Additionally, it would be advantageous to encrypt data that was being stored so that it would not be easily hacked. In our class discussion, we also established that highly vulnerable data, such as financial information, could not be stored or secured properly using LocalStorage in this way.
While these storage options have their positives and negatives, they both have applications in modern web development. Cookies are smaller and send server information back with every HTTP request, while LocalStorage is larger and can hold information on the client side.
Upvotes: 3