Are there ways to protect against draining the js files?

Good time of day. Copied one online designer banner stands, designer really cool and multi-functional and the client is treated fairly in the normal amount. Now afraid of what will merge as is only used js, html, css, and images. Are there options to protect the site from draining? that he only worked with him on hosting for example, I do not see any options at all, but may not know why.
April 4th 20 at 14:20
6 answers
April 4th 20 at 14:22
Only obfuscation
April 4th 20 at 14:24
100% no solution, of course you can strongly complicate the hijackers life.
For example, suppose the script periodically makes an ajax call (the domain needs to be clearly spelled out), let the server checks the referrer and if it is not equal to his domain returns a response that is received the script locit useful functionality. A string with the hostname is not stored in an explicit form, and encrypted. And of course the whole thing through an obfuscator to get rid of, for example, through

Nothing more serious can not come up.
April 4th 20 at 14:26
obfuscation + of the logic to move to the back. The benefit of js and buck's not bad today revolves.

The calculation of the size, location and so he is at the Beck. So much will be harder because you have to think out of the calculation algorithms.
April 4th 20 at 14:28
About obfuscation here already said is a bad method of protection according to the principle of "security via obscurity". And so, that is given to the client cannot be protected.

Protection can be built only on the execution of programs on the server - there are lots of technologies/protocols that allow to perform critical parts of the code that is on the server. However, the transfer of computational load on the server significantly degrades system for scaling and response time.
April 4th 20 at 14:30
April 4th 20 at 14:32
Obfuscation to put in a few places the function of which will break the whole script. Forgot the name of this method, but in General it works like this: the Script obsessives function(or better yet copies of that function) after certain time, everything is destroyed and nothing works. The type of bombs with a timer.

How to be the owner? Remembers the date when it will be "boom" and the day up to this point, put the new date. The script continues to run. It's all good.

It would be good to add back to was stronger.


Find more questions by tags HTMLJavaScriptCSS