Why Storage.setvalue lost value saved?

Former Member
Former Member

Hi Community,

I am havin a Value and saveing with Storage.setvalue and its working fine, but aventually, very , very randomly I lost that value so I need to get new valuel.

var value = Storage.getValue("deviceId");
if (value == null) {
Storage.setValue("deviceId", Math.rand());
}

This is my code for that event.

For first time devideId is empty, so I set value with randmon number, the next time deviceId it's not empty because I use the value saved on "disk", but eventualy the value for devidID change, that mean the vale saved on STorage is losted.

THe question is, on what situtation or conditions a value stored by Storage.value it's losted?

Regards,