-2

Im afraid that people who come to my website could steel parts or the whole page. How can i hide my source code or do something that people cant copy my work.

I know how to unable rightclick on my page, but i dont want to use this option. i think visitors could think that my site is suspicious.

Help really appreciated and thanks for your time.

  • same question as http://stackoverflow.com/questions/194397/how-can-i-obfuscateprotect-javascript – Reinard Mar 30 '16 at 21:11
  • 2
    The only completely valid answer is "you can't." If you're running HTML and JS on the client side, the user has your code. You can obfuscate it to make it harder to read but that's it. – Mike Cluck Mar 30 '16 at 21:12

2 Answers2

1

The only sure fire way to protect your proprietary code is to keep as much of the logic as possible on your server, serving up what's needed using services such as REST.

If it needs to be javascript on your website, there is only things to deter people from copying, that is making it less readable. Using obfuscation tools and/or minifying your code.

Victor Procure
  • 886
  • 1
  • 6
  • 17
0

You could minify your code so that it is not easily readable. http://jscompress.com/

Ds.109
  • 714
  • 8
  • 16
  • 32