This question has already been answered:

I am developing unique jQuery scripts and want no one to be able to see their source code. Can I connect the script so that it is loaded on the page, but that its source code is not visible?

Reported as a duplicate by Bald , user207618, Denis , aleksandr barakin , pavel Oct 7 '16 at 7:36 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

  • It can be hashed. I had experience with this. There are even special online services for this. Just change the encoding and the result is incomprehensible code to read. There is another way. You can download scripts via ajax - Hasanagha Aliyev

1 answer 1

JavaScript is executed on the client side by the browser. On the client side, the script must be loaded, read, and executed. Therefore, you can not fully protect your script. To complicate the study, you can use code obfuscation , but this is not a panacea. Only that which is executed on the server can be fully protected.