Suitable data structures for saving files in localStorage (HTML5)?

Currently I have decided after doing some reading and research that the best way to go is to store everything in objects using objects literals: var files = {}; // Add loads of data And then storing them using JSON.stringify() : localStorage. SetItem('myFiles', JSON. Stringify(files)) This makes good practice because it store large amounts of information that is easy to store and access.

Also it prevents from getting confusing when to use the simple way of adding key-value pair information in localStorage and when to use the localStorage. SetItem(key, value) function.

Currently I have decided after doing some reading and research that the best way to go is to store everything in objects using objects literals: var files = {}; // Add loads of data And then storing them using JSON.stringify(): localStorage. SetItem('myFiles', JSON. Stringify(files)); This makes good practice because it store large amounts of information that is easy to store and access.

Also it prevents from getting confusing when to use the simple way of adding key-value pair information in localStorage and when to use the localStorage. SetItem(key, value) function.

1 JSON is the answer here... – gnarf Jan 4 at 20:58.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions