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:
var key = localStorage.getItem("@Membership.GetUser().Username-SomeKey");
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?