2

Possible Duplicates:
How to encrypt my HTML, PHP & JavaScript?
How to disable or encrypt “View Source” for my site

If we click to View Page Source option of browser then you can not only view the code but also copy and reuse as your need. But some time you don't like to forward your code without permission, so how can you hide your web page source code form users so that s/he could not copy your code without your permission.

I visited it a website

and if you view it's source code and paste on a web supported file (html, htm, php, etc) then you can not edit some of the text as well as you are not allowed to access some css.

Community
  • 1
  • 1
PHP Ferrari
  • 15,754
  • 27
  • 83
  • 149
  • The site you mentioned, has all css/js and html totally accessible. Infact it quite well written with pretty line breaks (uncompressed) – gideon Mar 26 '11 at 06:36
  • Nice answer there @alex funny how I didn't find that one. – gideon Mar 26 '11 at 07:08

1 Answers1

3

You can't restrict to copy or anything.

One option you have is to Obfuscate your source. Obfuscation basically compresses and/or renames variables, methods. It makes things a bit faster and the code gets a lot more difficult to understand.

See

Community
  • 1
  • 1
gideon
  • 19,329
  • 11
  • 72
  • 113