How to Clear Local Storage after a server side code change

vnita

New Member
There are some scenarios where I've been using localStorage in order to persist some information for the users of an application. I use keys which help identify the user.Simple example:\[code\]var key = localStorage.getItem("@Membership.GetUser().Username-SomeKey");\[/code\]Let's say that I want to persist this information on the client, but I want to remove it when there is a code change (ie a new build). Let's assume that a code change might result in some of those locally stored values to contain "bad" data.What would be an easy way to wipe clean out the localStorage when there is a new build?
 
Back
Top