Search code examples
htmlpsd

Prevent HTML code from being stolen


I am showing a demo of PSD to HTML to my client. I want to upload the HTML document with CSS files and images in my server to show the demo to the client.

I am afraid if he will copy the HTML code.

Is there any way to decode / encode the html code so that it will not be understandable to copy?

Even if i prevent Right Click on the page he can use View > Page Source option or can save the webpage and then see the source code.


Solution

  • You cannot protect your JS, CSS or HTML code 100%.

    But you could confuse your client by encrypting the code, removing whitespaces, etc. He could copy and paste it but will not be able to edit or extend it that easy.

    This tool encrypts HTML to JS: http://www.iwebtool.com/html_encrypter

    CSS compressor (removes whitespaces and new lines): https://csscompressor.net/

    JavaScript compressor (removes whitespaces and new lines): http://javascriptcompressor.com/

    As @AMR already mentioned: protect your copyright and setup a contract. My advices above are just in case, if there is no trust in your client!