localStorage items are not modified by setItem()
By Dmitry Utkin
05 Jul 2013 06:23
English
22 Replies
Hi.
I'm facing a strage localStorage behavior. After setting some data with setItem() first time, it stays the same every time I try to modify it.
So I'm setting up some options\settings: setItem('a', 'a')
Then during app launch:
1) getItem('a') -> 'a'
2) setItem('a', 'b')
3) getItem('a') -> 'b'
BUT if i kill the app with Task Switcher and restart it getItem('a') gives me 'a' again! Any ideas on this issue?
Edited on 18 03, 2014
You must log in to use this service. Log in now?
The tag you entered already exists.
Do you want to report this post as spam?
The post has been reported as spam.
cannot be empty.
Are you sure you want to cancel and return to the list?
The code has been copied to the clipboard.
Enter a title.