I am working on a project where I have to save data from losing when the page gets refreshed. How to save data for future use? I don't want to use local storage. I have some idea about using AngularJs model but don't know how to use. Can someone help me out from this situtation.
Asked
Active
Viewed 23 times
0
-
What's the idea you have about using angularJS model? Because the only two ways I know you can achieve this is by storing it in a remote database and retrieving on page refresh or using localStorage/sessionStorage – orimdominic Sep 30 '18 at 11:19
-
cookies or databases – Dan Sep 30 '18 at 12:55
-
But anyone can see the data present in Session, localStorage or cookies, how to hide those data – user10428712 Oct 01 '18 at 06:01
-
Encode your data so that it is gibberish for the user - to completely hide it, you'd have to save it on server side – Akber Iqbal Oct 01 '18 at 09:14
-
Which encryption technique I have to use? – user10428712 Oct 01 '18 at 09:28
-
You cannot use an AngularJS model/service nor anything else, because when the page is reloaded, the application is reloaded as well, so it loses everything it stores. As other suggested, you should use local storage, cookies or a database. If you're concerned about local storage's security issues take a look at this link https://stackoverflow.com/questions/17280390/can-local-storage-ever-be-considered-secure – Oct 01 '18 at 10:42