by onion2k · 12y ago · 0 comments
Thanks very much for the feedback.
I will look into using localStorage, this has also been mentioned in another comment. Have you experience with this yourself?
I'll have a google around, are there any drawback with that approach you can think of?
Thanks again for the feedback, it's really appreciated!
var ls = window.localStorage;
var config = JSON.parse(ls.getItem('config')); //load the config
ls.setItem('config', JSON.stringify(config)); //save the config
That's pretty much it. You'll need to protect against the config not being there, but that's just a matter of using a default empty object if config is null.How would you suggest this is used then?
People have the option to save a file or to localStorage?
Or should it just do it in the background without people knowing or maybe it's set as a config option?
You opinion on this is really appreciated so thanks again!
IE < 8 does not support localStorage. May not be an issue depending on your target user-base.
Thanks for the heads up!
I'd hoped to avoid older browsers as burdening myself with the stress of backwards compatibility in my spare time doesn't seem too appealing. However, in saying that, if there was demand I would be more than happy to investigate. I use mac so I tend not to encounter IE too much if I can help it.
Thanks again for your input!