Page 1 of 1

Reset data cache on logout

Posted: Tue May 27, 2014 10:39 am
by David6727976

After logging out, all data input fields are supposed to clear cache, so that when you log back in again, you can start with a new session and new input zeroised values. No matter what I try all the fields have the values from the previous session.

Question: How can one initialise or zeroise session cache on input fields so that logging in every time gives you blank fields?


Reset data cache on logout

Posted: Tue May 27, 2014 11:53 am
by Kateryna Grynko

Hi David,

Did you try reloading page?prelocation.reload(true);/pre
Clearing cache is not that ease: http://www.excellentwebworld.com/how-...


Reset data cache on logout

Posted: Tue May 27, 2014 12:34 pm
by David6727976

Yep, I tried but this is not the answer. Logout = clean cache out. Login = new fields.


Reset data cache on logout

Posted: Tue May 27, 2014 4:28 pm
by Evgene Karachevtsev

Hello David,

Could you please detail your question, what data you want to clean?


Reset data cache on logout

Posted: Wed May 28, 2014 6:04 am
by David6727976

Hi, I don't want to clean data but rather input fields, let me re-explain the problem:
App starts, I login, all the fields are zeroised i.e. initiailized to default value of 0. I run the app and click submit, upon which I invoke logout. Ok, now I am out of the app. Some time later, I log back in again, and all the old values are still as it were on the previous entries. They need to be all 0.


Reset data cache on logout

Posted: Wed May 28, 2014 3:22 pm
by Evgene Karachevtsev

Hello David,

Keep your variable in localStorage, in which you should wright value while exiting, and check this value when entering. And if the user is active - just reload the page or set the values ​​manually, for example, cleaning of all input fields will be:

code$("input").val("");/code

Here you can find more examples: https://getsatisfaction.com/apperyio/...


Reset data cache on logout

Posted: Thu May 29, 2014 7:13 am
by David6727976

Hi, I have tried exactly this on several different places.
Where do you suggest I put the $("input").val(""); ? My first choice was onload of page, then I tried on logout event, then on login event, even tried onclick of login.


Reset data cache on logout

Posted: Thu May 29, 2014 2:30 pm
by Evgene Karachevtsev

David,

The code code$("input").val("") /codeshould clean all input component on the active page. Do you have any mistakes in console? Are you shure this code is fired?