Reputation: 311
I need help to hide/disable local-storage data from end-user. In my application i set data into local-storage but i need to hide those data to see anyone by debugging using Chrome/IE/Firefox.
window.localStorage.setItem('testValue', 'JSONarrayData');
Upvotes: 0
Views: 201
Reputation: 30355
You cannot have data on users machine that they cannot see. The only option is that you can encrypt it, but then you cannot read this data on client (since there is no key there or no point in encrypting it if key is present). Then you will need to decrypt this data on the server and if you have a call to do that, then it's almost the same as having it available.
So the question is: why do you really want to hide some data from a user? I think you start thinking about it in other direction. E.g. if your goal is to not allow user manipulation of data, then you can use signing.
Upvotes: 1