in chat application ,, Two friends x, y (used the same device) x Send to y message then stored in database x make log-out of the application and y log-in application and open chat and received the message here the message stored twice on the local storage and this is problem how to prevent duplicate storage on local storage ?
aseel.jaradat.9
0
Newbie Poster
Recommended Answers
Jump to PostEach user has a specific, unique, identifier, yes?
Pre-pend your root object with that decorator.
Ex:
UserData:{foo:1};
Can instead be:
1331UserData:{foo:1};
Then your code can look for said data by something like:
localStorage[userID + "UserData"];
Mind you this is all pseudo code so you'll still have to do some work.
…
All 4 Replies
ryantroop
177
Practically a Master Poster
aseel.jaradat.9
0
Newbie Poster
cool_zephyr
7
Junior Poster in Training
aseel.jaradat.9
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.