1. Home
  2. Computing & Technology
  3. JavaScript
Stephen Chapman
Stephen's JavaScript Blog

By Stephen Chapman, About.com Guide to JavaScript

You Can't Protect Your Page Content

Thursday November 12, 2009
Web pages are open source and there is nothing you can do to protect the content

Every so often I receive emails about my Image Protection JavaScript that places the image in the background of a table with a transparent image in front of it. All of these emails have pointed out that there are other ways to obtain the image and that it is not really protected. In fact there is no way to stop people obtaining the content of your web page since they have it already on their computer when they view your page. The same is true even if you use JavaScript to encrypt your page source since your visitors all have something that can decrypt it for them (called a web browser). In fact applying something as simple as a no right click script (which is the least effective way to try to protect anything) will just drive visitors away from your site. Any of these techniques may stop newbie web users from taking your code and images (and will do so at least as effectively as much longer codes and more expensive solutions found elsewhere on the web) but nothing will prevent someone who knows how the web works from obtaining whatever they want from your site.
Comments

No comments yet. Leave a Comment

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

Explore JavaScript
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. JavaScript

©2009 About.com, a part of The New York Times Company.

All rights reserved.