function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nethra RaghupathyNethra Raghupathy 

Storing variable in memory

Hi,

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.