Does memory allocated to JavaScript variables in a PhoneGap app go out of scope if the app is closed?

29 Views Asked by At

For example if I declare:

var x = … // get result from some API

Will this result be available for use the next time I open the app or should I store it locally on the device ?

1

There are 1 best solutions below

0
Romain Willmann On BEST ANSWER

Phonegap variable storage is not persistent. If you need to store value, consider using localStorage or a database