David6727976
Posts: 0
Joined: Tue Mar 11, 2014 9:52 pm

Reset data cache on logout

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?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Reset data cache on logout

Hi David,

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

David6727976
Posts: 0
Joined: Tue Mar 11, 2014 9:52 pm

Reset data cache on logout

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

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Reset data cache on logout

Hello David,

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

David6727976
Posts: 0
Joined: Tue Mar 11, 2014 9:52 pm

Reset data cache on logout

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.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Reset data cache on logout

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/...

David6727976
Posts: 0
Joined: Tue Mar 11, 2014 9:52 pm

Reset data cache on logout

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.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Reset data cache on logout

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?

Return to “Issues”