Protecting Javascript?

superaff1984

Senior Member
Premium Member
Joined
Jun 16, 2010
Messages
992
Reaction score
131
Is there any way we can protect or mask our javascript, so no one can see it or reuse it?
 
Is there any way we can protect or mask our javascript, so no one can see it or reuse it?
I think it’s difficult to fully protect JavaScript because it runs on the user’s browser.


I think sometimes people can view the code using developer tools.


I think you can obfuscate the code to make it harder to understand.


I think using server-side code instead helps protect key logic.


I think though, there’s no perfect way to completely hide it.


I think the best approach is to secure sensitive actions on the server.
 
Is there any way we can protect or mask our javascript, so no one can see it or reuse it?
you can’t 100% protect any code. everything can be decompiled and debugged. but there are ways to make it so difficult that it’s not worth the effort. for js, look into code obfuscation. there are ready-made solutions on github.
 
Back
Top