PROTECTING YOUR CONTENT, HIDING YOUR CODE - Mar 23rd, 2012


If you want to disable the viewing your source code by right clicking on your page, you can add oncontextmenu="return
false" to the head tag.

To prevent dragging and copying text on your site you can add onselectstart="return false"

And finally if you want to stop visitors from dragging images or other objects from your page to their desktop, add
ondragstart="return false"

These can be included in any block level element tags and will act on that content only.

These are not perfect solutions because the developer tools in most browsers will still allow access to the information,
but it will stop the less technically savvy visitors, and certainly slow down the others.



The materials on this web site have been created for use with CMS Builder content management software. CMS Builder software is published and licensed for use by InteractiveTools.com. Please contact Interactive Tools for information on the downloading of the software or the purchasing of licenses.


Terms of Service