samedi 4 avril 2015

Web Storage how to handle outdated model

I'm using HTML5 local storage to save data from my web site which is supposed to be completely client-side. I was thinking of using a versioning system (just a simple string) so that the web site detects whenever there's a need to update the model with new data, but I'm not sure how to handle all cases of updating from every version. What if I simply add a new data structure or object to the model which I'm saving, eventually I'll need to write multiple update functions which back up the data for different versions that are using different model structures. My point is that the user data should not be reset every time there's an update that affects the model. How is this usually handled?





Aucun commentaire:

Enregistrer un commentaire