Paul Medawar
Posts: 0
Joined: Thu Apr 03, 2014 10:55 am

localstorage.clear on logout

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?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

localstorage.clear on logout

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

Paul Medawar
Posts: 0
Joined: Thu Apr 03, 2014 10:55 am

localstorage.clear on logout

thanks Illya

Return to “Issues”