0

I'm using jquery cookie plugin to save data, the data is saved and i can read it but it's goes when i'm close the browser and open it again, i do programming for Samsung smart TV app, and the api support cookie, also as i said i can read the data throw the cookie, i set the expiry date too 100 day, but when I close the TV and open it again there is no data, the TV use Mozilla, here is my code.

 jQuery.cookie("user", data, { expires: 100 });

while data is json object from the ajax call, i parse it to string and save it and it's worked fine when i'm read it, but the problem is when i'm closing the TV and open it again there is no data saved.

1 Answers1

0

Maybe you should use sf.core.localData("user", data); instead of cookies. Just see guide.

Then you have to emulate expiration on your own - maybe save timestamp in your data and then compare it with current timestamp when TV/app is starting. If data expired, just do what you need.

As far as I know the common area mentioned in guide is the only way to store persistent data.

Wirone
  • 3,304
  • 1
  • 29
  • 48