Reputation: 31
I am working on a web mobile application. In my application I get a json string from a server, in my java script using:
var xhr = new XMLHttpRequest(url);
then I convert the json text to json object, save it in a local storage, then use it in different java scripts. In my project I am using only HTML and java script files and everything works fine for me. My only problem is how to secure the data I get so it wont be used by another, as the application will be available for people to use, and I am not allowed to make them access that json string I am getting from the server.
Thx for your time
Upvotes: 2
Views: 144
Reputation: 4278
A way you could get the server to verify your connection like that the server checks if you are logged in and if the requirement is met it sends you the data.
And also using SSL.
Avoiding caching the data.
http://www-archive.mozilla.org/projects/netlib/http/http-caching-faq.html
http://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Avoiding_caching
Upvotes: 1