Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

delete from localstorage

Hi folks,
how can I delete the content of a localstorage variable on success of a service

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

delete from localstorage

You can set it an empty string value:
pre
localStorage.removeItem("key");
/pre

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

delete from localstorage

Sorry lllya,
I meant remove all content completely, so as new service from db can be saved in the localstorage variable

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

delete from localstorage

Hi Michael,

A new service just rewrites localStorage values. It's possible to clear all the variables using this code:prelocalStorage.clear();/pre

Ellen Schlechter
Posts: 0
Joined: Sun Aug 31, 2014 3:28 am

delete from localstorage

By "key", do you mean the LSV you want to clear?

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

delete from localstorage

Hi Ellen,

Yes.

Regards.

Return to “Issues”