Page 1 of 1

localstorage.clear on logout

Posted: Tue Jul 18, 2017 7:41 am
by Paul Medawar

Hi,

I'm using

localStorage.clear();

on logout, primarily to clear the users "userSessionToken" LSV.

I've noticed that this initially clears the "pushNotificationDeviceID" LSV also.

Is the "pushNotificationDeviceID" automatically picked up again somehow, or do I need to write some code to assign this LSV again?


localstorage.clear on logout

Posted: Tue Jul 18, 2017 9:16 am
by Illya Stepanov

Hello Paul,

By using this JS code you're clearing all the local storage data on that page. For clearing the specific storage value you can use following:

precode
//Clears the value of "userSessionToken"
localStorage.clear("userSessionToken");
/code/pre


localstorage.clear on logout

Posted: Tue Jul 18, 2017 2:32 pm
by Paul Medawar

thanks Illya