Hi folks,
how can I delete the content of a localstorage variable on success of a service
Hi folks,
how can I delete the content of a localstorage variable on success of a service
You can set it an empty string value:
pre
localStorage.removeItem("key");
/pre
Sorry lllya,
I meant remove all content completely, so as new service from db can be saved in the localstorage variable
Hi Michael,
A new service just rewrites localStorage values. It's possible to clear all the variables using this code:prelocalStorage.clear();/pre
By "key", do you mean the LSV you want to clear?
Hi Ellen,
Yes.
Regards.