Protecting client side logic & data

2019-02-21 02:52发布

问题:

I am coding a data intense web app. So that means I cant be possibly doing any computations on sever- computation after every event involves huge data too large to be sent to sever again & again.

So I have to do all execution & keep all data on clint side only. Currently I am using JS to do so. Is there a way by which I can protect my js files & data so that no one has (atleast an easy) access to it ?

Is there some other way of putting (except JS) to put logic & data on client & conceal them ?

thanks,

回答1:

Rather than using javascript for the client side logic, perhaps you could use an applet which was compiled from obfuscated java source code.



回答2:

You cannot protect javascript files.

--

I'm not aware of the specifics of your application, but there is almost certainly a way for the user to manipulate the data while it resides on your server.

You should open a new question with more details about your app.



回答3:

As far as your logic is concerned, you can use minification tools to make the code a bit hard to figure. This in no way shape or form completely protects your code, but just another tactic to fight back.