It's sometimes useful to store volatile preferences outside stored user preferences. Typically this is done in cookies which  we should probably move away from in preference for localStorage
MobileFrontend has a library mw.mobileFrontend.require( 'settings') that saves/gets settings from local storage with optional cookie fallback.
Flow has its own one and there have been various other attempts  to do this. Does VE do anything similar?
We should standardise on a lean library that does this in core.