+ Start a Discussion
Nethra RaghupathyNethra Raghupathy 

Storing variable in memory


I have a lightning app, which sets a variable during first time. From next time when the user users the app it should fetch from the memory. 

what is the best place to store the variable details? (local storage/cookie/custom object etc) 
Tuur Dutoit 13Tuur Dutoit 13
If you really want to tie it to a certain User, I think you'll have to save it in a custom object. If you only need it in the browser (effectively tied to a user's browser session), I would use localStorage.
Nethra RaghupathyNethra Raghupathy
Hi Tuur,

It's org specific value. 
If I store it in localStorage it becomes browser specific right?. I want it to work across all the browsers.